summaryrefslogtreecommitdiff
path: root/src/video_core/shader/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/shader/shader.cpp')
-rw-r--r--src/video_core/shader/shader.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index f7459e2ad..06c1fe653 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -16,20 +16,18 @@
16#include "shader.h" 16#include "shader.h"
17#include "shader_interpreter.h" 17#include "shader_interpreter.h"
18 18
19#ifdef ARCHITECTURE_X64 19#ifdef ARCHITECTURE_x86_64
20#include "shader_jit_x64.h" 20#include "shader_jit_x64.h"
21#endif // ARCHITECTURE_X64 21#endif // ARCHITECTURE_x86_64
22 22
23namespace Pica { 23namespace Pica {
24 24
25namespace Shader { 25namespace Shader {
26 26
27#ifdef ARCHITECTURE_x86_64 27#ifdef ARCHITECTURE_x86_64
28
29static std::unordered_map<u64, CompiledShader*> shader_map; 28static std::unordered_map<u64, CompiledShader*> shader_map;
30static JitCompiler jit; 29static JitCompiler jit;
31static CompiledShader* jit_shader; 30static CompiledShader* jit_shader;
32
33#endif // ARCHITECTURE_x86_64 31#endif // ARCHITECTURE_x86_64
34 32
35void Setup(UnitState& state) { 33void Setup(UnitState& state) {
@@ -46,7 +44,8 @@ void Setup(UnitState& state) {
46 jit_shader = jit.Compile(); 44 jit_shader = jit.Compile();
47 shader_map.emplace(cache_key, jit_shader); 45 shader_map.emplace(cache_key, jit_shader);
48 } 46 }
49#endif // ARCHITECTURE_X64 47 }
48#endif // ARCHITECTURE_x86_64
50} 49}
51 50
52void Shutdown() { 51void Shutdown() {
@@ -95,7 +94,7 @@ OutputVertex Run(UnitState& state, const InputVertex& input, int num_attributes)
95 RunInterpreter(state); 94 RunInterpreter(state);
96#else 95#else
97 RunInterpreter(state); 96 RunInterpreter(state);
98#endif // ARCHITECTURE_X64 97#endif // ARCHITECTURE_x86_64
99 98
100#if PICA_DUMP_SHADERS 99#if PICA_DUMP_SHADERS
101 DebugUtils::DumpShader(setup.program_code.data(), state.debug.max_offset, setup.swizzle_data.data(), 100 DebugUtils::DumpShader(setup.program_code.data(), state.debug.max_offset, setup.swizzle_data.data(),