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.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index c7f23dab9..a4aa3c9e0 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -109,15 +109,12 @@ void ShaderSetup::Setup() {
109 109
110MICROPROFILE_DEFINE(GPU_Shader, "GPU", "Shader", MP_RGB(50, 50, 240)); 110MICROPROFILE_DEFINE(GPU_Shader, "GPU", "Shader", MP_RGB(50, 50, 240));
111 111
112void ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, int num_attributes) { 112void ShaderSetup::Run(UnitState& state, const InputVertex& input, int num_attributes) {
113 auto& config = g_state.regs.vs; 113 auto& config = g_state.regs.vs;
114 auto& setup = g_state.vs; 114 auto& setup = g_state.vs;
115 115
116 MICROPROFILE_SCOPE(GPU_Shader); 116 MICROPROFILE_SCOPE(GPU_Shader);
117 117
118 state.debug.max_offset = 0;
119 state.debug.max_opdesc_id = 0;
120
121 // Setup input register table 118 // Setup input register table
122 const auto& attribute_register_map = config.input_register_map; 119 const auto& attribute_register_map = config.input_register_map;
123 120
@@ -128,22 +125,23 @@ void ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, int num
128 state.conditional_code[1] = false; 125 state.conditional_code[1] = false;
129 126
130#ifdef ARCHITECTURE_x86_64 127#ifdef ARCHITECTURE_x86_64
131 if (VideoCore::g_shader_jit_enabled) 128 if (VideoCore::g_shader_jit_enabled) {
132 jit_shader->Run(setup, state, config.main_offset); 129 jit_shader->Run(setup, state, config.main_offset);
133 else 130 } else {
134 RunInterpreter(setup, state, config.main_offset); 131 DebugData<false> dummy_debug_data;
132 RunInterpreter(setup, state, dummy_debug_data, config.main_offset);
133 }
135#else 134#else
136 RunInterpreter(setup, state, config.main_offset); 135 DebugData<false> dummy_debug_data;
136 RunInterpreter(setup, state, dummy_debug_data, config.main_offset);
137#endif // ARCHITECTURE_x86_64 137#endif // ARCHITECTURE_x86_64
138} 138}
139 139
140DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_attributes, 140DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_attributes,
141 const Regs::ShaderConfig& config, 141 const Regs::ShaderConfig& config,
142 const ShaderSetup& setup) { 142 const ShaderSetup& setup) {
143 UnitState<true> state; 143 UnitState state;
144 144 DebugData<true> debug_data;
145 state.debug.max_offset = 0;
146 state.debug.max_opdesc_id = 0;
147 145
148 // Setup input register table 146 // Setup input register table
149 boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero())); 147 boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero()));
@@ -154,8 +152,8 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_
154 state.conditional_code[0] = false; 152 state.conditional_code[0] = false;
155 state.conditional_code[1] = false; 153 state.conditional_code[1] = false;
156 154
157 RunInterpreter(setup, state, config.main_offset); 155 RunInterpreter(setup, state, debug_data, config.main_offset);
158 return state.debug; 156 return debug_data;
159} 157}
160 158
161} // namespace Shader 159} // namespace Shader