summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-12-26 05:07:34 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-28 20:58:30 +0100
commit2392b548bee87553b39f50c1159640b0dabc4b13 (patch)
tree5a1a5046be222eee078acc5f3a5e55d34abfaff6 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentgl_state: Remove multisample tracking (diff)
downloadyuzu-2392b548bee87553b39f50c1159640b0dabc4b13.tar
yuzu-2392b548bee87553b39f50c1159640b0dabc4b13.tar.gz
yuzu-2392b548bee87553b39f50c1159640b0dabc4b13.tar.bz2
yuzu-2392b548bee87553b39f50c1159640b0dabc4b13.tar.lz
yuzu-2392b548bee87553b39f50c1159640b0dabc4b13.tar.xz
yuzu-2392b548bee87553b39f50c1159640b0dabc4b13.tar.zst
yuzu-2392b548bee87553b39f50c1159640b0dabc4b13.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index dc2d60156..d7971f86f 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -415,6 +415,11 @@ void RasterizerOpenGL::Clear() {
clear_state.color_mask[0].green_enabled = regs.clear_buffers.G ? GL_TRUE : GL_FALSE;
clear_state.color_mask[0].blue_enabled = regs.clear_buffers.B ? GL_TRUE : GL_FALSE;
clear_state.color_mask[0].alpha_enabled = regs.clear_buffers.A ? GL_TRUE : GL_FALSE;
+
+ // TODO: Signal state tracker about these changes
+ SyncFramebufferSRGB();
+ // TODO(Rodrigo): Determine if clamping is used on clears
+ SyncFragmentColorClampState();
}
if (regs.clear_buffers.Z) {
ASSERT_MSG(regs.zeta_enable != 0, "Tried to clear Z but buffer is not enabled!");
@@ -454,9 +459,6 @@ void RasterizerOpenGL::Clear() {
}
}
- // TODO: Signal state tracker about these changes
- SyncFramebufferSRGB();
-
if (!use_color && !use_depth && !use_stencil) {
// No color surface nor depth/stencil surface are enabled
return;
@@ -1089,7 +1091,7 @@ void RasterizerOpenGL::SyncMultiSampleState() {
void RasterizerOpenGL::SyncFragmentColorClampState() {
const auto& regs = system.GPU().Maxwell3D().regs;
- state.fragment_color_clamp.enabled = regs.frag_color_clamp != 0;
+ glClampColor(GL_CLAMP_FRAGMENT_COLOR, regs.frag_color_clamp ? GL_TRUE : GL_FALSE);
}
void RasterizerOpenGL::SyncBlendState() {