diff options
| author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-12-16 22:30:00 -0800 |
|---|---|---|
| committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-01-25 18:53:23 -0800 |
| commit | 1e1f9398176e4f1ec608f31f22a576c749a0a723 (patch) | |
| tree | 1c2ced663dcfe434ae0750f0ca64590c1f1dba5f /src/video_core/shader/shader.cpp | |
| parent | e3caf669b05bc0727053885ee7e6e5c78d655df4 (diff) | |
VideoCore/Shader: Use only entry_point as ShaderSetup param
This removes all implicit dependency of ShaderState on global PICA
state.
Diffstat (limited to 'src/video_core/shader/shader.cpp')
| -rw-r--r-- | src/video_core/shader/shader.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp index 868be1360..936db0582 100644 --- a/src/video_core/shader/shader.cpp +++ b/src/video_core/shader/shader.cpp @@ -120,33 +120,35 @@ void ShaderSetup::Setup() { MICROPROFILE_DEFINE(GPU_Shader, "GPU", "Shader", MP_RGB(50, 50, 240)); -void ShaderSetup::Run(UnitState& state) { - auto& config = g_state.regs.vs; +void ShaderSetup::Run(UnitState& state, unsigned int entry_point) { + ASSERT(entry_point < 1024); MICROPROFILE_SCOPE(GPU_Shader); #ifdef ARCHITECTURE_x86_64 if (VideoCore::g_shader_jit_enabled) { - jit_shader->Run(*this, state, config.main_offset); + jit_shader->Run(*this, state, entry_point); } else { DebugData<false> dummy_debug_data; - RunInterpreter(*this, state, dummy_debug_data, config.main_offset); + RunInterpreter(*this, state, dummy_debug_data, entry_point); } #else DebugData<false> dummy_debug_data; - RunInterpreter(*this, state, dummy_debug_data, config.main_offset); + RunInterpreter(*this, state, dummy_debug_data, entry_point); #endif // ARCHITECTURE_x86_64 } DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_attributes, - const Regs::ShaderConfig& config) { + unsigned int entry_point) { + ASSERT(entry_point < 1024); + UnitState state; DebugData<true> debug_data; // Setup input register table boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero())); state.LoadInputVertex(input, num_attributes); - RunInterpreter(*this, state, debug_data, config.main_offset); + RunInterpreter(*this, state, debug_data, entry_point); return debug_data; } |
