diff options
| author | 2016-05-16 17:54:45 +0100 | |
|---|---|---|
| committer | 2016-05-16 17:54:45 +0100 | |
| commit | f40fabd688576fae7ab91195547a6967178b28dd (patch) | |
| tree | 3e3768978c47ae3c35e5318d8ff361825047a909 /src/video_core/shader/shader.cpp | |
| parent | Merge pull request #1792 from JayFoxRox/avoid-uninitialised (diff) | |
| parent | Use new shader-jit signature for interpreter (diff) | |
| download | yuzu-f40fabd688576fae7ab91195547a6967178b28dd.tar.gz yuzu-f40fabd688576fae7ab91195547a6967178b28dd.tar.xz yuzu-f40fabd688576fae7ab91195547a6967178b28dd.zip | |
Merge pull request #1787 from JayFoxRox/refactor-jit
Refactor JIT
Diffstat (limited to 'src/video_core/shader/shader.cpp')
| -rw-r--r-- | src/video_core/shader/shader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp index e93a9d92a..161097610 100644 --- a/src/video_core/shader/shader.cpp +++ b/src/video_core/shader/shader.cpp | |||
| @@ -64,6 +64,7 @@ MICROPROFILE_DEFINE(GPU_Shader, "GPU", "Shader", MP_RGB(50, 50, 240)); | |||
| 64 | 64 | ||
| 65 | OutputVertex ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, int num_attributes) { | 65 | OutputVertex ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, int num_attributes) { |
| 66 | auto& config = g_state.regs.vs; | 66 | auto& config = g_state.regs.vs; |
| 67 | auto& setup = g_state.vs; | ||
| 67 | 68 | ||
| 68 | MICROPROFILE_SCOPE(GPU_Shader); | 69 | MICROPROFILE_SCOPE(GPU_Shader); |
| 69 | 70 | ||
| @@ -81,11 +82,11 @@ OutputVertex ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, | |||
| 81 | 82 | ||
| 82 | #ifdef ARCHITECTURE_x86_64 | 83 | #ifdef ARCHITECTURE_x86_64 |
| 83 | if (VideoCore::g_shader_jit_enabled) | 84 | if (VideoCore::g_shader_jit_enabled) |
| 84 | jit_shader->Run(&state.registers, g_state.regs.vs.main_offset); | 85 | jit_shader->Run(setup, state, config.main_offset); |
| 85 | else | 86 | else |
| 86 | RunInterpreter(state); | 87 | RunInterpreter(setup, state, config.main_offset); |
| 87 | #else | 88 | #else |
| 88 | RunInterpreter(state); | 89 | RunInterpreter(setup, state, config.main_offset); |
| 89 | #endif // ARCHITECTURE_x86_64 | 90 | #endif // ARCHITECTURE_x86_64 |
| 90 | 91 | ||
| 91 | // Setup output data | 92 | // Setup output data |
| @@ -156,7 +157,7 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_ | |||
| 156 | state.conditional_code[0] = false; | 157 | state.conditional_code[0] = false; |
| 157 | state.conditional_code[1] = false; | 158 | state.conditional_code[1] = false; |
| 158 | 159 | ||
| 159 | RunInterpreter(state); | 160 | RunInterpreter(setup, state, config.main_offset); |
| 160 | return state.debug; | 161 | return state.debug; |
| 161 | } | 162 | } |
| 162 | 163 | ||