diff options
| author | 2016-04-30 16:34:51 +0100 | |
|---|---|---|
| committer | 2016-04-30 17:02:41 +0100 | |
| commit | 691a42fe98954c247a8b7e9305a3e9ca5c04d40c (patch) | |
| tree | 52b6a286b6609675cbc69c63b3aa9f695ea95f0f /src/video_core/shader | |
| parent | LCD: Remove unneeded #undef with no matching #define. (diff) | |
| download | yuzu-691a42fe98954c247a8b7e9305a3e9ca5c04d40c.tar.gz yuzu-691a42fe98954c247a8b7e9305a3e9ca5c04d40c.tar.xz yuzu-691a42fe98954c247a8b7e9305a3e9ca5c04d40c.zip | |
VideoCore: Run include-what-you-use and fix most includes.
Diffstat (limited to 'src/video_core/shader')
| -rw-r--r-- | src/video_core/shader/shader.cpp | 18 | ||||
| -rw-r--r-- | src/video_core/shader/shader.h | 8 | ||||
| -rw-r--r-- | src/video_core/shader/shader_interpreter.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/shader/shader_interpreter.h | 4 | ||||
| -rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/shader/shader_jit_x64.h | 5 |
6 files changed, 43 insertions, 14 deletions
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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <memory> | 5 | #include <atomic> |
| 6 | #include <cmath> | ||
| 7 | #include <cstring> | ||
| 6 | #include <unordered_map> | 8 | #include <unordered_map> |
| 9 | #include <utility> | ||
| 7 | 10 | ||
| 8 | #include <boost/range/algorithm/fill.hpp> | 11 | #include <boost/range/algorithm/fill.hpp> |
| 9 | 12 | ||
| 13 | #include "common/bit_field.h" | ||
| 10 | #include "common/hash.h" | 14 | #include "common/hash.h" |
| 15 | #include "common/logging/log.h" | ||
| 11 | #include "common/microprofile.h" | 16 | #include "common/microprofile.h" |
| 12 | 17 | ||
| 13 | #include "video_core/debug_utils/debug_utils.h" | ||
| 14 | #include "video_core/pica.h" | 18 | #include "video_core/pica.h" |
| 15 | #include "video_core/pica_state.h" | 19 | #include "video_core/pica_state.h" |
| 16 | #include "video_core/video_core.h" | 20 | #include "video_core/shader/shader.h" |
| 17 | 21 | #include "video_core/shader/shader_interpreter.h" | |
| 18 | #include "shader.h" | ||
| 19 | #include "shader_interpreter.h" | ||
| 20 | 22 | ||
| 21 | #ifdef ARCHITECTURE_x86_64 | 23 | #ifdef ARCHITECTURE_x86_64 |
| 22 | #include "shader_jit_x64.h" | 24 | #include "video_core/shader/shader_jit_x64.h" |
| 23 | #endif // ARCHITECTURE_x86_64 | 25 | #endif // ARCHITECTURE_x86_64 |
| 24 | 26 | ||
| 27 | #include "video_core/video_core.h" | ||
| 28 | |||
| 25 | namespace Pica { | 29 | namespace Pica { |
| 26 | 30 | ||
| 27 | namespace Shader { | 31 | 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 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 8 | #include <cstddef> | ||
| 9 | #include <memory> | ||
| 10 | #include <type_traits> | ||
| 7 | #include <vector> | 11 | #include <vector> |
| 8 | 12 | ||
| 9 | #include <boost/container/static_vector.hpp> | 13 | #include <boost/container/static_vector.hpp> |
| 10 | 14 | ||
| 11 | #include <nihstro/shader_binary.h> | 15 | #include <nihstro/shader_bytecode.h> |
| 12 | 16 | ||
| 17 | #include "common/assert.h" | ||
| 13 | #include "common/common_funcs.h" | 18 | #include "common/common_funcs.h" |
| 14 | #include "common/common_types.h" | 19 | #include "common/common_types.h" |
| 15 | #include "common/vector_math.h" | 20 | #include "common/vector_math.h" |
| 16 | 21 | ||
| 17 | #include "video_core/pica.h" | 22 | #include "video_core/pica.h" |
| 23 | #include "video_core/pica_types.h" | ||
| 18 | 24 | ||
| 19 | using nihstro::RegisterType; | 25 | using nihstro::RegisterType; |
| 20 | using nihstro::SourceRegister; | 26 | 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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | ||
| 6 | #include <array> | ||
| 7 | #include <cmath> | ||
| 5 | #include <numeric> | 8 | #include <numeric> |
| 9 | |||
| 6 | #include <nihstro/shader_bytecode.h> | 10 | #include <nihstro/shader_bytecode.h> |
| 7 | 11 | ||
| 8 | #include "common/file_util.h" | 12 | #include "common/assert.h" |
| 9 | #include "video_core/pica.h" | 13 | #include "common/common_types.h" |
| 14 | #include "common/logging/log.h" | ||
| 15 | #include "common/vector_math.h" | ||
| 16 | |||
| 10 | #include "video_core/pica_state.h" | 17 | #include "video_core/pica_state.h" |
| 18 | #include "video_core/pica_types.h" | ||
| 11 | #include "video_core/shader/shader.h" | 19 | #include "video_core/shader/shader.h" |
| 12 | #include "video_core/shader/shader_interpreter.h" | 20 | #include "video_core/shader/shader_interpreter.h" |
| 13 | 21 | ||
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 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "video_core/shader/shader.h" | ||
| 8 | |||
| 9 | namespace Pica { | 7 | namespace Pica { |
| 10 | 8 | ||
| 11 | namespace Shader { | 9 | namespace Shader { |
| 12 | 10 | ||
| 11 | template <bool Debug> struct UnitState; | ||
| 12 | |||
| 13 | template<bool Debug> | 13 | template<bool Debug> |
| 14 | void RunInterpreter(UnitState<Debug>& state); | 14 | void RunInterpreter(UnitState<Debug>& state); |
| 15 | 15 | ||
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 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <smmintrin.h> | 6 | #include <cmath> |
| 7 | #include <cstdint> | ||
| 8 | #include <xmmintrin.h> | ||
| 7 | 9 | ||
| 10 | #include <nihstro/shader_bytecode.h> | ||
| 11 | |||
| 12 | #include "common/assert.h" | ||
| 13 | #include "common/logging/log.h" | ||
| 14 | #include "common/vector_math.h" | ||
| 8 | #include "common/x64/abi.h" | 15 | #include "common/x64/abi.h" |
| 9 | #include "common/x64/cpu_detect.h" | 16 | #include "common/x64/cpu_detect.h" |
| 10 | #include "common/x64/emitter.h" | 17 | #include "common/x64/emitter.h" |
| @@ -13,6 +20,7 @@ | |||
| 13 | #include "shader_jit_x64.h" | 20 | #include "shader_jit_x64.h" |
| 14 | 21 | ||
| 15 | #include "video_core/pica_state.h" | 22 | #include "video_core/pica_state.h" |
| 23 | #include "video_core/pica_types.h" | ||
| 16 | 24 | ||
| 17 | namespace Pica { | 25 | namespace Pica { |
| 18 | 26 | ||
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 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 8 | #include <cstddef> | ||
| 7 | #include <utility> | 9 | #include <utility> |
| 8 | #include <vector> | 10 | #include <vector> |
| 9 | 11 | ||
| 10 | #include <nihstro/shader_bytecode.h> | 12 | #include <nihstro/shader_bytecode.h> |
| 11 | 13 | ||
| 14 | #include "common/bit_set.h" | ||
| 15 | #include "common/common_types.h" | ||
| 12 | #include "common/x64/emitter.h" | 16 | #include "common/x64/emitter.h" |
| 13 | 17 | ||
| 14 | #include "video_core/pica.h" | ||
| 15 | #include "video_core/shader/shader.h" | 18 | #include "video_core/shader/shader.h" |
| 16 | 19 | ||
| 17 | using nihstro::Instruction; | 20 | using nihstro::Instruction; |