From 387d935a54241540c3d5258fb09bba18f54969ae Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 30 Apr 2016 13:18:21 +0100 Subject: LCD: Remove unneeded #undef with no matching #define. --- src/core/hw/lcd.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h index 3dd877fbf..57029c5e8 100644 --- a/src/core/hw/lcd.h +++ b/src/core/hw/lcd.h @@ -52,8 +52,6 @@ struct Regs { return content[index]; } -#undef ASSERT_MEMBER_SIZE - }; static_assert(std::is_standard_layout::value, "Structure does not use standard layout"); -- cgit v1.2.3 From 691a42fe98954c247a8b7e9305a3e9ca5c04d40c Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 30 Apr 2016 16:34:51 +0100 Subject: VideoCore: Run include-what-you-use and fix most includes. --- src/citra_qt/debugger/graphics_tracing.cpp | 4 ++++ src/common/bit_field.h | 2 +- src/common/bit_set.h | 3 ++- src/common/code_block.h | 6 ++++-- src/common/common_funcs.h | 4 ++++ src/common/file_util.h | 2 +- src/common/x64/emitter.h | 2 ++ src/core/hle/result.h | 1 - src/core/hle/service/gsp_gpu.h | 1 + src/core/settings.h | 3 ++- src/core/tracer/recorder.h | 1 + src/video_core/clipper.cpp | 13 ++++++++++++- src/video_core/command_processor.cpp | 22 ++++++++++++++-------- src/video_core/debug_utils/debug_utils.cpp | 14 ++++++++++---- src/video_core/debug_utils/debug_utils.h | 16 +++++++++++++--- src/video_core/pica.cpp | 5 ++++- src/video_core/pica.h | 7 ++++--- src/video_core/pica_state.h | 5 +++++ src/video_core/pica_types.h | 1 + src/video_core/primitive_assembly.cpp | 3 +-- src/video_core/rasterizer.cpp | 10 ++++++++-- src/video_core/renderer_base.cpp | 3 +-- src/video_core/renderer_opengl/gl_rasterizer.cpp | 13 +++++++------ src/video_core/renderer_opengl/gl_rasterizer.h | 14 ++++++++++++-- .../renderer_opengl/gl_rasterizer_cache.cpp | 13 +++++++++++-- .../renderer_opengl/gl_rasterizer_cache.h | 14 ++++++++++---- src/video_core/renderer_opengl/gl_shader_gen.cpp | 8 ++++++++ src/video_core/renderer_opengl/gl_shader_gen.h | 2 +- src/video_core/renderer_opengl/gl_shader_util.cpp | 3 ++- src/video_core/renderer_opengl/gl_state.cpp | 7 +++++-- src/video_core/renderer_opengl/gl_state.h | 1 - src/video_core/renderer_opengl/pica_to_gl.h | 7 +++++++ src/video_core/renderer_opengl/renderer_opengl.cpp | 15 ++++++++++----- src/video_core/renderer_opengl/renderer_opengl.h | 3 +++ src/video_core/shader/shader.cpp | 18 +++++++++++------- src/video_core/shader/shader.h | 8 +++++++- src/video_core/shader/shader_interpreter.cpp | 12 ++++++++++-- src/video_core/shader/shader_interpreter.h | 4 ++-- src/video_core/shader/shader_jit_x64.cpp | 10 +++++++++- src/video_core/shader/shader_jit_x64.h | 5 ++++- src/video_core/swrasterizer.h | 6 ++++++ src/video_core/utils.h | 2 -- src/video_core/vertex_loader.cpp | 10 +++++----- src/video_core/vertex_loader.h | 13 +++++++++---- src/video_core/video_core.cpp | 4 ---- 45 files changed, 234 insertions(+), 86 deletions(-) (limited to 'src') diff --git a/src/citra_qt/debugger/graphics_tracing.cpp b/src/citra_qt/debugger/graphics_tracing.cpp index e06498744..1402f8e79 100644 --- a/src/citra_qt/debugger/graphics_tracing.cpp +++ b/src/citra_qt/debugger/graphics_tracing.cpp @@ -2,6 +2,9 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include +#include +#include #include #include @@ -18,6 +21,7 @@ #include "core/hw/gpu.h" #include "core/hw/lcd.h" +#include "core/tracer/recorder.h" #include "nihstro/float24.h" diff --git a/src/common/bit_field.h b/src/common/bit_field.h index 371eb17a1..4748999ed 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h @@ -186,5 +186,5 @@ private: #pragma pack() #if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER) -static_assert(std::is_trivially_copyable>::value, "BitField must be trivially copyable"); +static_assert(std::is_trivially_copyable>::value, "BitField must be trivially copyable"); #endif diff --git a/src/common/bit_set.h b/src/common/bit_set.h index 85f91e786..7f5de8df2 100644 --- a/src/common/bit_set.h +++ b/src/common/bit_set.h @@ -7,6 +7,7 @@ #include #endif #include +#include #include #include "common/common_types.h" @@ -186,4 +187,4 @@ public: typedef Common::BitSet BitSet8; typedef Common::BitSet BitSet16; typedef Common::BitSet BitSet32; -typedef Common::BitSet BitSet64; \ No newline at end of file +typedef Common::BitSet BitSet64; diff --git a/src/common/code_block.h b/src/common/code_block.h index 9ef7296d3..2fa4a0090 100644 --- a/src/common/code_block.h +++ b/src/common/code_block.h @@ -4,8 +4,10 @@ #pragma once -#include "common_types.h" -#include "memory_util.h" +#include + +#include "common/common_types.h" +#include "common/memory_util.h" // Everything that needs to generate code should inherit from this. // You get memory management for free, plus, you can use all emitter functions without diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index aa6aff7b9..ab3515683 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -4,6 +4,10 @@ #pragma once +#if !defined(ARCHITECTURE_x86_64) && !defined(_M_ARM) +#include // for exit +#endif + #include "common_types.h" #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) diff --git a/src/common/file_util.h b/src/common/file_util.h index 3aac4fa46..c6a8694ce 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -7,9 +7,9 @@ #include #include #include -#include #include #include +#include #include #include "common/common_types.h" diff --git a/src/common/x64/emitter.h b/src/common/x64/emitter.h index a33724146..60a77dfe1 100644 --- a/src/common/x64/emitter.h +++ b/src/common/x64/emitter.h @@ -17,6 +17,8 @@ #pragma once +#include + #include "common/assert.h" #include "common/bit_set.h" #include "common/common_types.h" diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 53931a106..3fc1ab4ee 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include #include "common/assert.h" diff --git a/src/core/hle/service/gsp_gpu.h b/src/core/hle/service/gsp_gpu.h index 55a993bb8..3b4b678a3 100644 --- a/src/core/hle/service/gsp_gpu.h +++ b/src/core/hle/service/gsp_gpu.h @@ -10,6 +10,7 @@ #include "common/bit_field.h" #include "common/common_types.h" +#include "core/hle/result.h" #include "core/hle/service/service.h" //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/settings.h b/src/core/settings.h index 04c0a47f9..ce2a31164 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -6,7 +6,8 @@ #include #include -#include + +#include "common/common_types.h" namespace Settings { diff --git a/src/core/tracer/recorder.h b/src/core/tracer/recorder.h index a42ccc45f..febf883c8 100644 --- a/src/core/tracer/recorder.h +++ b/src/core/tracer/recorder.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include diff --git a/src/video_core/clipper.cpp b/src/video_core/clipper.cpp index 3d503486e..2bc747102 100644 --- a/src/video_core/clipper.cpp +++ b/src/video_core/clipper.cpp @@ -2,13 +2,24 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include +#include +#include + #include +#include + +#include "common/bit_field.h" +#include "common/common_types.h" +#include "common/logging/log.h" +#include "common/vector_math.h" #include "video_core/clipper.h" #include "video_core/pica.h" #include "video_core/pica_state.h" +#include "video_core/pica_types.h" #include "video_core/rasterizer.h" -#include "video_core/shader/shader_interpreter.h" +#include "video_core/shader/shader.h" namespace Pica { diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 58883e374..be1a936b2 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -2,26 +2,32 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include -#include +#include +#include +#include +#include -#include "common/alignment.h" +#include "common/assert.h" +#include "common/logging/log.h" #include "common/microprofile.h" +#include "common/vector_math.h" -#include "core/settings.h" #include "core/hle/service/gsp_gpu.h" #include "core/hw/gpu.h" +#include "core/memory.h" +#include "core/tracer/recorder.h" -#include "video_core/clipper.h" #include "video_core/command_processor.h" +#include "video_core/debug_utils/debug_utils.h" #include "video_core/pica.h" #include "video_core/pica_state.h" +#include "video_core/pica_types.h" #include "video_core/primitive_assembly.h" +#include "video_core/rasterizer_interface.h" #include "video_core/renderer_base.h" -#include "video_core/video_core.h" -#include "video_core/debug_utils/debug_utils.h" -#include "video_core/shader/shader_interpreter.h" +#include "video_core/shader/shader.h" #include "video_core/vertex_loader.h" +#include "video_core/video_core.h" namespace Pica { diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 178a566f7..fb20f81dd 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp @@ -4,35 +4,41 @@ #include #include +#include #include #include -#include #include #include +#include #include #ifdef HAVE_PNG #include +#include #endif +#include #include #include #include "common/assert.h" +#include "common/bit_field.h" #include "common/color.h" #include "common/common_types.h" #include "common/file_util.h" +#include "common/logging/log.h" #include "common/math_util.h" #include "common/vector_math.h" -#include "core/settings.h" - +#include "video_core/debug_utils/debug_utils.h" #include "video_core/pica.h" #include "video_core/pica_state.h" +#include "video_core/pica_types.h" +#include "video_core/rasterizer_interface.h" #include "video_core/renderer_base.h" +#include "video_core/shader/shader.h" #include "video_core/utils.h" #include "video_core/video_core.h" -#include "video_core/debug_utils/debug_utils.h" using nihstro::DVLBHeader; using nihstro::DVLEHeader; diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h index dd0828cee..be2d0301a 100644 --- a/src/video_core/debug_utils/debug_utils.h +++ b/src/video_core/debug_utils/debug_utils.h @@ -4,23 +4,33 @@ #pragma once +#include #include #include +#include #include #include #include #include +#include +#include #include +#include "common/common_types.h" #include "common/vector_math.h" -#include "core/tracer/recorder.h" - #include "video_core/pica.h" -#include "video_core/shader/shader.h" + +namespace CiTrace { +class Recorder; +} namespace Pica { +namespace Shader { +struct ShaderSetup; +} + class DebugContext { public: enum class Event { diff --git a/src/video_core/pica.cpp b/src/video_core/pica.cpp index ccbaf071b..be82cf4b5 100644 --- a/src/video_core/pica.cpp +++ b/src/video_core/pica.cpp @@ -3,10 +3,13 @@ // Refer to the license.txt file included. #include +#include #include +#include #include "video_core/pica.h" #include "video_core/pica_state.h" +#include "video_core/primitive_assembly.h" #include "video_core/shader/shader.h" namespace Pica { @@ -480,7 +483,7 @@ std::string Regs::GetCommandName(int index) { static std::unordered_map map; if (map.empty()) { - map.insert(begin(register_names), end(register_names)); + map.insert(std::begin(register_names), std::end(register_names)); } // Return empty string if no match is found diff --git a/src/video_core/pica.h b/src/video_core/pica.h index cf130d7f8..5891fb72a 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -5,10 +5,13 @@ #pragma once #include -#include #include #include +#ifndef _MSC_VER +#include // for std::enable_if +#endif + #include "common/assert.h" #include "common/bit_field.h" #include "common/common_funcs.h" @@ -16,8 +19,6 @@ #include "common/vector_math.h" #include "common/logging/log.h" -#include "pica_types.h" - namespace Pica { // Returns index corresponding to the Regs member labeled by field_name diff --git a/src/video_core/pica_state.h b/src/video_core/pica_state.h index 323290054..bbecad850 100644 --- a/src/video_core/pica_state.h +++ b/src/video_core/pica_state.h @@ -4,6 +4,11 @@ #pragma once +#include + +#include "common/bit_field.h" +#include "common/common_types.h" + #include "video_core/pica.h" #include "video_core/primitive_assembly.h" #include "video_core/shader/shader.h" diff --git a/src/video_core/pica_types.h b/src/video_core/pica_types.h index ecf45654b..3b7bfbdca 100644 --- a/src/video_core/pica_types.h +++ b/src/video_core/pica_types.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include "common/common_types.h" diff --git a/src/video_core/primitive_assembly.cpp b/src/video_core/primitive_assembly.cpp index ff3e2b862..68ea3c08a 100644 --- a/src/video_core/primitive_assembly.cpp +++ b/src/video_core/primitive_assembly.cpp @@ -6,8 +6,7 @@ #include "video_core/pica.h" #include "video_core/primitive_assembly.h" -#include "video_core/debug_utils/debug_utils.h" -#include "video_core/shader/shader_interpreter.h" +#include "video_core/shader/shader.h" namespace Pica { diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 9cf77b1f2..df67b9081 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -3,22 +3,28 @@ // Refer to the license.txt file included. #include +#include #include +#include "common/assert.h" +#include "common/bit_field.h" #include "common/color.h" #include "common/common_types.h" +#include "common/logging/log.h" #include "common/math_util.h" #include "common/microprofile.h" +#include "common/vector_math.h" #include "core/memory.h" #include "core/hw/gpu.h" +#include "video_core/debug_utils/debug_utils.h" #include "video_core/pica.h" #include "video_core/pica_state.h" +#include "video_core/pica_types.h" #include "video_core/rasterizer.h" #include "video_core/utils.h" -#include "video_core/debug_utils/debug_utils.h" -#include "video_core/shader/shader_interpreter.h" +#include "video_core/shader/shader.h" namespace Pica { diff --git a/src/video_core/renderer_base.cpp b/src/video_core/renderer_base.cpp index ccd497de0..3f451e062 100644 --- a/src/video_core/renderer_base.cpp +++ b/src/video_core/renderer_base.cpp @@ -2,10 +2,9 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include -#include "core/settings.h" - #include "video_core/renderer_base.h" #include "video_core/video_core.h" #include "video_core/swrasterizer.h" diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index a8c775c80..20460c9b9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -2,27 +2,28 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include #include +#include +#include +#include #include +#include "common/assert.h" #include "common/color.h" -#include "common/file_util.h" +#include "common/logging/log.h" #include "common/math_util.h" -#include "common/microprofile.h" +#include "common/vector_math.h" -#include "core/memory.h" -#include "core/settings.h" #include "core/hw/gpu.h" #include "video_core/pica.h" #include "video_core/pica_state.h" -#include "video_core/utils.h" #include "video_core/renderer_opengl/gl_rasterizer.h" #include "video_core/renderer_opengl/gl_shader_gen.h" #include "video_core/renderer_opengl/gl_shader_util.h" #include "video_core/renderer_opengl/pica_to_gl.h" +#include "video_core/renderer_opengl/renderer_opengl.h" static bool IsPassThroughTevStage(const Pica::Regs::TevStageConfig& stage) { return (stage.color_op == Pica::Regs::TevStageConfig::Operation::Replace && diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 8d6177e88..8d44af0b3 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -4,23 +4,33 @@ #pragma once +#include #include #include #include #include #include +#include + +#include "common/bit_field.h" #include "common/common_types.h" #include "common/hash.h" +#include "common/vector_math.h" + +#include "core/hw/gpu.h" #include "video_core/pica.h" #include "video_core/pica_state.h" +#include "video_core/pica_types.h" #include "video_core/rasterizer_interface.h" #include "video_core/renderer_opengl/gl_rasterizer_cache.h" +#include "video_core/renderer_opengl/gl_resource_manager.h" #include "video_core/renderer_opengl/gl_state.h" #include "video_core/renderer_opengl/pica_to_gl.h" -#include "video_core/renderer_opengl/renderer_opengl.h" -#include "video_core/shader/shader_interpreter.h" +#include "video_core/shader/shader.h" + +struct ScreenInfo; /** * This struct contains all state used to generate the GLSL shader program that emulates the current diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 55c2fb283..7efd0038a 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -2,10 +2,19 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include +#include +#include +#include #include +#include +#include +#include + +#include "common/bit_field.h" #include "common/emu_window.h" -#include "common/hash.h" +#include "common/logging/log.h" #include "common/math_util.h" #include "common/microprofile.h" #include "common/vector_math.h" @@ -15,7 +24,7 @@ #include "video_core/debug_utils/debug_utils.h" #include "video_core/pica_state.h" #include "video_core/renderer_opengl/gl_rasterizer_cache.h" -#include "video_core/renderer_opengl/pica_to_gl.h" +#include "video_core/renderer_opengl/gl_state.h" #include "video_core/utils.h" #include "video_core/video_core.h" diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 893d51138..225596415 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -4,20 +4,26 @@ #pragma once -#include +#include #include #include +#include #include +#include -#include "common/math_util.h" +#include "common/assert.h" +#include "common/common_funcs.h" +#include "common/common_types.h" #include "core/hw/gpu.h" #include "video_core/pica.h" -#include "video_core/debug_utils/debug_utils.h" #include "video_core/renderer_opengl/gl_resource_manager.h" -#include "video_core/renderer_opengl/gl_state.h" + +namespace MathUtil { +template struct Rectangle; +} struct CachedSurface; diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 646b4eaaf..9011caa39 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -2,9 +2,17 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include +#include + +#include "common/assert.h" +#include "common/bit_field.h" +#include "common/logging/log.h" + #include "video_core/pica.h" #include "video_core/renderer_opengl/gl_rasterizer.h" #include "video_core/renderer_opengl/gl_shader_gen.h" +#include "video_core/renderer_opengl/gl_shader_util.h" using Pica::Regs; using TevStageConfig = Regs::TevStageConfig; diff --git a/src/video_core/renderer_opengl/gl_shader_gen.h b/src/video_core/renderer_opengl/gl_shader_gen.h index 0ca9d2879..3eb07d57a 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.h +++ b/src/video_core/renderer_opengl/gl_shader_gen.h @@ -6,7 +6,7 @@ #include -#include "video_core/renderer_opengl/gl_rasterizer.h" +struct PicaShaderConfig; namespace GLShader { diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp index e3f7a5868..dded3db46 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.cpp +++ b/src/video_core/renderer_opengl/gl_shader_util.cpp @@ -2,9 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include #include +#include + #include "common/logging/log.h" #include "video_core/renderer_opengl/gl_shader_util.h" diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index f04bdd8c5..02cd9f417 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -2,8 +2,11 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "video_core/pica.h" -#include "video_core/renderer_opengl/gl_resource_manager.h" +#include + +#include "common/common_funcs.h" +#include "common/logging/log.h" + #include "video_core/renderer_opengl/gl_state.h" OpenGLState OpenGLState::cur_state; diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 0f72e9004..24f20e47c 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -5,7 +5,6 @@ #pragma once #include -#include class OpenGLState { public: diff --git a/src/video_core/renderer_opengl/pica_to_gl.h b/src/video_core/renderer_opengl/pica_to_gl.h index fd3617d77..976d1f364 100644 --- a/src/video_core/renderer_opengl/pica_to_gl.h +++ b/src/video_core/renderer_opengl/pica_to_gl.h @@ -4,9 +4,16 @@ #pragma once +#include +#include + #include +#include "common/assert.h" +#include "common/bit_field.h" +#include "common/common_funcs.h" #include "common/common_types.h" +#include "common/logging/log.h" #include "video_core/pica.h" diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 8f907593f..0e9a0be8b 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -5,23 +5,28 @@ #include #include #include +#include + +#include #include "common/assert.h" +#include "common/bit_field.h" #include "common/emu_window.h" #include "common/logging/log.h" #include "common/profiler_reporting.h" +#include "common/synchronized_wrapper.h" -#include "core/memory.h" -#include "core/settings.h" #include "core/hw/gpu.h" #include "core/hw/hw.h" #include "core/hw/lcd.h" +#include "core/memory.h" +#include "core/settings.h" +#include "core/tracer/recorder.h" -#include "video_core/video_core.h" #include "video_core/debug_utils/debug_utils.h" -#include "video_core/renderer_opengl/gl_rasterizer.h" -#include "video_core/renderer_opengl/gl_shader_util.h" +#include "video_core/rasterizer_interface.h" #include "video_core/renderer_opengl/renderer_opengl.h" +#include "video_core/video_core.h" static const char vertex_shader[] = R"( #version 150 core diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index 5ca5255ac..00e1044ab 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -8,6 +8,9 @@ #include +#include "common/common_types.h" +#include "common/math_util.h" + #include "core/hw/gpu.h" #include "video_core/renderer_base.h" diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp index 043e99190..356d87f13 100644 --- a/src/video_core/shader/shader.cpp +++ b/src/video_core/shader/shader.cpp @@ -2,26 +2,30 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include +#include +#include +#include #include +#include #include +#include "common/bit_field.h" #include "common/hash.h" +#include "common/logging/log.h" #include "common/microprofile.h" -#include "video_core/debug_utils/debug_utils.h" #include "video_core/pica.h" #include "video_core/pica_state.h" -#include "video_core/video_core.h" - -#include "shader.h" -#include "shader_interpreter.h" +#include "video_core/shader/shader.h" +#include "video_core/shader/shader_interpreter.h" #ifdef ARCHITECTURE_x86_64 -#include "shader_jit_x64.h" +#include "video_core/shader/shader_jit_x64.h" #endif // ARCHITECTURE_x86_64 +#include "video_core/video_core.h" + namespace Pica { namespace Shader { diff --git a/src/video_core/shader/shader.h b/src/video_core/shader/shader.h index 9ce9344d2..56b83bfeb 100644 --- a/src/video_core/shader/shader.h +++ b/src/video_core/shader/shader.h @@ -4,17 +4,23 @@ #pragma once +#include +#include +#include +#include #include #include -#include +#include +#include "common/assert.h" #include "common/common_funcs.h" #include "common/common_types.h" #include "common/vector_math.h" #include "video_core/pica.h" +#include "video_core/pica_types.h" using nihstro::RegisterType; using nihstro::SourceRegister; diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index 9b978583e..7710f7fbc 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp @@ -2,12 +2,20 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include +#include +#include #include + #include -#include "common/file_util.h" -#include "video_core/pica.h" +#include "common/assert.h" +#include "common/common_types.h" +#include "common/logging/log.h" +#include "common/vector_math.h" + #include "video_core/pica_state.h" +#include "video_core/pica_types.h" #include "video_core/shader/shader.h" #include "video_core/shader/shader_interpreter.h" diff --git a/src/video_core/shader/shader_interpreter.h b/src/video_core/shader/shader_interpreter.h index 294bca50e..6048cdf3a 100644 --- a/src/video_core/shader/shader_interpreter.h +++ b/src/video_core/shader/shader_interpreter.h @@ -4,12 +4,12 @@ #pragma once -#include "video_core/shader/shader.h" - namespace Pica { namespace Shader { +template struct UnitState; + template void RunInterpreter(UnitState& state); diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index b7747fa42..99f6c51eb 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -3,8 +3,15 @@ // Refer to the license.txt file included. #include -#include +#include +#include +#include +#include + +#include "common/assert.h" +#include "common/logging/log.h" +#include "common/vector_math.h" #include "common/x64/abi.h" #include "common/x64/cpu_detect.h" #include "common/x64/emitter.h" @@ -13,6 +20,7 @@ #include "shader_jit_x64.h" #include "video_core/pica_state.h" +#include "video_core/pica_types.h" namespace Pica { diff --git a/src/video_core/shader/shader_jit_x64.h b/src/video_core/shader/shader_jit_x64.h index cd6280ade..30aa7ff30 100644 --- a/src/video_core/shader/shader_jit_x64.h +++ b/src/video_core/shader/shader_jit_x64.h @@ -4,14 +4,17 @@ #pragma once +#include +#include #include #include #include +#include "common/bit_set.h" +#include "common/common_types.h" #include "common/x64/emitter.h" -#include "video_core/pica.h" #include "video_core/shader/shader.h" using nihstro::Instruction; diff --git a/src/video_core/swrasterizer.h b/src/video_core/swrasterizer.h index 090f899bc..0a028b774 100644 --- a/src/video_core/swrasterizer.h +++ b/src/video_core/swrasterizer.h @@ -8,6 +8,12 @@ #include "video_core/rasterizer_interface.h" +namespace Pica { +namespace Shader { +struct OutputVertex; +} +} + namespace VideoCore { class SWRasterizer : public RasterizerInterface { diff --git a/src/video_core/utils.h b/src/video_core/utils.h index 8b007520b..7ce83a055 100644 --- a/src/video_core/utils.h +++ b/src/video_core/utils.h @@ -4,8 +4,6 @@ #pragma once -#include - #include "common/common_types.h" namespace VideoCore { diff --git a/src/video_core/vertex_loader.cpp b/src/video_core/vertex_loader.cpp index 8a3d91896..21ae52949 100644 --- a/src/video_core/vertex_loader.cpp +++ b/src/video_core/vertex_loader.cpp @@ -1,14 +1,13 @@ -#include -#include +#include -#include "boost/range/algorithm/fill.hpp" +#include #include "common/assert.h" #include "common/alignment.h" #include "common/bit_field.h" -#include "common/common_funcs.h" #include "common/common_types.h" #include "common/logging/log.h" +#include "common/vector_math.h" #include "core/memory.h" @@ -16,6 +15,7 @@ #include "video_core/pica.h" #include "video_core/pica_state.h" #include "video_core/pica_types.h" +#include "video_core/shader/shader.h" #include "video_core/vertex_loader.h" namespace Pica { @@ -137,4 +137,4 @@ void VertexLoader::LoadVertex(u32 base_address, int index, int vertex, Shader::I } } -} // namespace Pica \ No newline at end of file +} // namespace Pica diff --git a/src/video_core/vertex_loader.h b/src/video_core/vertex_loader.h index ff42d1596..becf5a403 100644 --- a/src/video_core/vertex_loader.h +++ b/src/video_core/vertex_loader.h @@ -1,14 +1,19 @@ #pragma once -#include -#include +#include "common/common_types.h" #include "video_core/pica.h" -#include "video_core/shader/shader.h" -#include "video_core/debug_utils/debug_utils.h" namespace Pica { +namespace DebugUtils { +class MemoryAccessTracker; +} + +namespace Shader { +class InputVertex; +} + class VertexLoader { public: void Setup(const Pica::Regs& regs); diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 855286173..c9975876d 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -4,12 +4,8 @@ #include -#include "common/emu_window.h" #include "common/logging/log.h" -#include "core/core.h" -#include "core/settings.h" - #include "video_core/pica.h" #include "video_core/renderer_base.h" #include "video_core/video_core.h" -- cgit v1.2.3