diff options
author | bunnei <bunneidev@gmail.com> | 2019-04-17 04:19:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 04:19:03 +0200 |
commit | 21d498bc0671111d83e0b7174721beecfa8b8c69 (patch) | |
tree | 3e01823ec4a389d34f1419130b71a0f8d0d7c20c /src | |
parent | Merge pull request #2405 from lioncash/qt (diff) | |
parent | gl_rasterizer: Apply just the needed state on Clear (diff) | |
download | yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.tar yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.tar.gz yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.tar.bz2 yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.tar.lz yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.tar.xz yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.tar.zst yuzu-21d498bc0671111d83e0b7174721beecfa8b8c69.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index ea42fd060..0b1fe3494 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -582,9 +582,6 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers( } void RasterizerOpenGL::Clear() { - const auto prev_state{state}; - SCOPE_EXIT({ prev_state.Apply(); }); - const auto& regs = system.GPU().Maxwell3D().regs; bool use_color{}; bool use_depth{}; @@ -656,7 +653,10 @@ void RasterizerOpenGL::Clear() { clear_state.EmulateViewportWithScissor(); } - clear_state.Apply(); + clear_state.ApplyColorMask(); + clear_state.ApplyDepth(); + clear_state.ApplyStencilTest(); + clear_state.ApplyViewport(); if (use_color) { glClearBufferfv(GL_COLOR, regs.clear_buffers.RT, regs.clear_color); |