diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-30 05:20:08 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 21:56:42 +0100 |
commit | 231601763c4717f8d7978341994a479e4283fa3d (patch) | |
tree | 2728608710280f5ca4cb24948bf195ebe3f2d540 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | gl_state_tracker: Implement dirty flags for logic op (diff) | |
download | yuzu-231601763c4717f8d7978341994a479e4283fa3d.tar yuzu-231601763c4717f8d7978341994a479e4283fa3d.tar.gz yuzu-231601763c4717f8d7978341994a479e4283fa3d.tar.bz2 yuzu-231601763c4717f8d7978341994a479e4283fa3d.tar.lz yuzu-231601763c4717f8d7978341994a479e4283fa3d.tar.xz yuzu-231601763c4717f8d7978341994a479e4283fa3d.tar.zst yuzu-231601763c4717f8d7978341994a479e4283fa3d.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 4cb050da6..7ffb8fa09 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -1149,8 +1149,14 @@ void RasterizerOpenGL::SyncMultiSampleState() { } void RasterizerOpenGL::SyncFragmentColorClampState() { - const auto& regs = system.GPU().Maxwell3D().regs; - glClampColor(GL_CLAMP_FRAGMENT_COLOR, regs.frag_color_clamp ? GL_TRUE : GL_FALSE); + auto& gpu = system.GPU().Maxwell3D(); + auto& flags = gpu.dirty.flags; + if (!flags[Dirty::FragmentClampColor]) { + return; + } + flags[Dirty::FragmentClampColor] = false; + + glClampColor(GL_CLAMP_FRAGMENT_COLOR, gpu.regs.frag_color_clamp ? GL_TRUE : GL_FALSE); } void RasterizerOpenGL::SyncBlendState() { |