summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_manager.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-11-25 08:37:29 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2018-11-25 08:37:29 +0100
commit924e834b8fbc105b19c0029c7870ad2ddd934f3e (patch)
treec1005f674b8a74397f165158515dcb131e0d6903 /src/video_core/renderer_opengl/gl_shader_manager.cpp
parentMerge pull request #1641 from DarkLordZach/sm-register-unregister (diff)
downloadyuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.tar
yuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.tar.gz
yuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.tar.bz2
yuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.tar.lz
yuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.tar.xz
yuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.tar.zst
yuzu-924e834b8fbc105b19c0029c7870ad2ddd934f3e.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_manager.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_manager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp
index 8b8869ecb..6a30c28d2 100644
--- a/src/video_core/renderer_opengl/gl_shader_manager.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp
@@ -27,16 +27,18 @@ void MaxwellUniformData::SetFromRegs(const Maxwell3D::State::ShaderStageInfo& sh
alpha_test.func = func;
alpha_test.ref = regs.alpha_test_ref;
- // We only assign the instance to the first component of the vector, the rest is just padding.
- instance_id[0] = state.current_instance;
+ instance_id = state.current_instance;
// Assign in which stage the position has to be flipped
// (the last stage before the fragment shader).
if (gpu.regs.shader_config[static_cast<u32>(Maxwell3D::Regs::ShaderProgram::Geometry)].enable) {
- flip_stage[0] = static_cast<u32>(Maxwell3D::Regs::ShaderProgram::Geometry);
+ flip_stage = static_cast<u32>(Maxwell3D::Regs::ShaderProgram::Geometry);
} else {
- flip_stage[0] = static_cast<u32>(Maxwell3D::Regs::ShaderProgram::VertexB);
+ flip_stage = static_cast<u32>(Maxwell3D::Regs::ShaderProgram::VertexB);
}
+
+ // Y_NEGATE controls what value S2R returns for the Y_DIRECTION system value.
+ y_direction = regs.screen_y_control.y_negate == 0 ? 1.f : -1.f;
}
} // namespace OpenGL::GLShader