diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/shader.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/shader/shader_interpreter.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/shader/shader_interpreter.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp index d36d3d78e..161097610 100644 --- a/src/video_core/shader/shader.cpp +++ b/src/video_core/shader/shader.cpp | |||
| @@ -84,9 +84,9 @@ OutputVertex ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, | |||
| 84 | if (VideoCore::g_shader_jit_enabled) | 84 | if (VideoCore::g_shader_jit_enabled) |
| 85 | jit_shader->Run(setup, state, config.main_offset); | 85 | jit_shader->Run(setup, state, config.main_offset); |
| 86 | else | 86 | else |
| 87 | RunInterpreter(state); | 87 | RunInterpreter(setup, state, config.main_offset); |
| 88 | #else | 88 | #else |
| 89 | RunInterpreter(state); | 89 | RunInterpreter(setup, state, config.main_offset); |
| 90 | #endif // ARCHITECTURE_x86_64 | 90 | #endif // ARCHITECTURE_x86_64 |
| 91 | 91 | ||
| 92 | // Setup output data | 92 | // Setup output data |
| @@ -157,7 +157,7 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_ | |||
| 157 | state.conditional_code[0] = false; | 157 | state.conditional_code[0] = false; |
| 158 | state.conditional_code[1] = false; | 158 | state.conditional_code[1] = false; |
| 159 | 159 | ||
| 160 | RunInterpreter(state); | 160 | RunInterpreter(setup, state, config.main_offset); |
| 161 | return state.debug; | 161 | return state.debug; |
| 162 | } | 162 | } |
| 163 | 163 | ||
diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index 3a827d11f..714e8bfd5 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp | |||
| @@ -41,11 +41,11 @@ struct CallStackElement { | |||
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | template<bool Debug> | 43 | template<bool Debug> |
| 44 | void RunInterpreter(UnitState<Debug>& state) { | 44 | void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned offset) { |
| 45 | // TODO: Is there a maximal size for this? | 45 | // TODO: Is there a maximal size for this? |
| 46 | boost::container::static_vector<CallStackElement, 16> call_stack; | 46 | boost::container::static_vector<CallStackElement, 16> call_stack; |
| 47 | 47 | ||
| 48 | u32 program_counter = g_state.regs.vs.main_offset; | 48 | u32 program_counter = offset; |
| 49 | 49 | ||
| 50 | const auto& uniforms = g_state.vs.uniforms; | 50 | const auto& uniforms = g_state.vs.uniforms; |
| 51 | const auto& swizzle_data = g_state.vs.swizzle_data; | 51 | const auto& swizzle_data = g_state.vs.swizzle_data; |
| @@ -647,8 +647,8 @@ void RunInterpreter(UnitState<Debug>& state) { | |||
| 647 | } | 647 | } |
| 648 | 648 | ||
| 649 | // Explicit instantiation | 649 | // Explicit instantiation |
| 650 | template void RunInterpreter(UnitState<false>& state); | 650 | template void RunInterpreter(const ShaderSetup& setup, UnitState<false>& state, unsigned offset); |
| 651 | template void RunInterpreter(UnitState<true>& state); | 651 | template void RunInterpreter(const ShaderSetup& setup, UnitState<true>& state, unsigned offset); |
| 652 | 652 | ||
| 653 | } // namespace | 653 | } // namespace |
| 654 | 654 | ||
diff --git a/src/video_core/shader/shader_interpreter.h b/src/video_core/shader/shader_interpreter.h index 6048cdf3a..bb3ce1c6e 100644 --- a/src/video_core/shader/shader_interpreter.h +++ b/src/video_core/shader/shader_interpreter.h | |||
| @@ -11,7 +11,7 @@ namespace Shader { | |||
| 11 | template <bool Debug> struct UnitState; | 11 | template <bool Debug> struct UnitState; |
| 12 | 12 | ||
| 13 | template<bool Debug> | 13 | template<bool Debug> |
| 14 | void RunInterpreter(UnitState<Debug>& state); | 14 | void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned offset); |
| 15 | 15 | ||
| 16 | } // namespace | 16 | } // namespace |
| 17 | 17 | ||