From 0f642741451e3f75c2f1d64ae9beccaf1437f12c Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 17 Dec 2016 16:06:04 -0800 Subject: VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetup --- src/video_core/shader/shader_interpreter.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/video_core/shader/shader_interpreter.cpp') diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index a6197c10a..e44abbf1d 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp @@ -652,25 +652,23 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData } } -void InterpreterEngine::SetupBatch(const ShaderSetup* setup_) { - setup = setup_; -} +void InterpreterEngine::SetupBatch(ShaderSetup& setup) {} MICROPROFILE_DECLARE(GPU_Shader); -void InterpreterEngine::Run(UnitState& state, unsigned int entry_point) const { - ASSERT(setup != nullptr); +void InterpreterEngine::Run(const ShaderSetup& setup, UnitState& state, + unsigned int entry_point) const { ASSERT(entry_point < 1024); MICROPROFILE_SCOPE(GPU_Shader); DebugData dummy_debug_data; - RunInterpreter(*setup, state, dummy_debug_data, entry_point); + RunInterpreter(setup, state, dummy_debug_data, entry_point); } -DebugData InterpreterEngine::ProduceDebugInfo(const InputVertex& input, int num_attributes, +DebugData InterpreterEngine::ProduceDebugInfo(const ShaderSetup& setup, + const InputVertex& input, int num_attributes, unsigned int entry_point) const { - ASSERT(setup != nullptr); ASSERT(entry_point < 1024); UnitState state; @@ -679,7 +677,7 @@ DebugData InterpreterEngine::ProduceDebugInfo(const InputVertex& input, in // Setup input register table boost::fill(state.registers.input, Math::Vec4::AssignToAll(float24::Zero())); state.LoadInputVertex(input, num_attributes); - RunInterpreter(*setup, state, debug_data, entry_point); + RunInterpreter(setup, state, debug_data, entry_point); return debug_data; } -- cgit v1.2.3