summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/command_processor.cpp4
-rw-r--r--src/video_core/shader/shader.cpp2
-rw-r--r--src/video_core/shader/shader.h2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 0495a9fac..8a5d8533c 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -251,7 +251,6 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
251 ASSERT(vertex != -1); 251 ASSERT(vertex != -1);
252 252
253 bool vertex_cache_hit = false; 253 bool vertex_cache_hit = false;
254 Shader::OutputRegisters output_registers;
255 254
256 if (is_indexed) { 255 if (is_indexed) {
257 if (g_debug_context && Pica::g_debug_context->recorder) { 256 if (g_debug_context && Pica::g_debug_context->recorder) {
@@ -279,10 +278,9 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
279 g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation, 278 g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation,
280 (void*)&input); 279 (void*)&input);
281 g_state.vs.Run(shader_unit, input, loader.GetNumTotalAttributes()); 280 g_state.vs.Run(shader_unit, input, loader.GetNumTotalAttributes());
282 output_registers = shader_unit.output_registers;
283 281
284 // Retrieve vertex from register data 282 // Retrieve vertex from register data
285 output_vertex = output_registers.ToVertex(regs.vs); 283 output_vertex = shader_unit.output_registers.ToVertex(regs.vs);
286 284
287 if (is_indexed) { 285 if (is_indexed) {
288 vertex_cache[vertex_cache_pos] = output_vertex; 286 vertex_cache[vertex_cache_pos] = output_vertex;
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index 3febe739c..c7f23dab9 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -25,7 +25,7 @@ namespace Pica {
25 25
26namespace Shader { 26namespace Shader {
27 27
28OutputVertex OutputRegisters::ToVertex(const Regs::ShaderConfig& config) { 28OutputVertex OutputRegisters::ToVertex(const Regs::ShaderConfig& config) const {
29 // Setup output data 29 // Setup output data
30 OutputVertex ret; 30 OutputVertex ret;
31 // TODO(neobrain): Under some circumstances, up to 16 attributes may be output. We need to 31 // TODO(neobrain): Under some circumstances, up to 16 attributes may be output. We need to
diff --git a/src/video_core/shader/shader.h b/src/video_core/shader/shader.h
index 8858d67f8..0111d8c0f 100644
--- a/src/video_core/shader/shader.h
+++ b/src/video_core/shader/shader.h
@@ -85,7 +85,7 @@ struct OutputRegisters {
85 85
86 alignas(16) Math::Vec4<float24> value[16]; 86 alignas(16) Math::Vec4<float24> value[16];
87 87
88 OutputVertex ToVertex(const Regs::ShaderConfig& config); 88 OutputVertex ToVertex(const Regs::ShaderConfig& config) const;
89}; 89};
90static_assert(std::is_pod<OutputRegisters>::value, "Structure is not POD"); 90static_assert(std::is_pod<OutputRegisters>::value, "Structure is not POD");
91 91