summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-17 04:19:03 +0200
committerGitHub <noreply@github.com>2019-04-17 04:19:03 +0200
commit21d498bc0671111d83e0b7174721beecfa8b8c69 (patch)
tree3e01823ec4a389d34f1419130b71a0f8d0d7c20c /src/video_core
parentMerge pull request #2405 from lioncash/qt (diff)
parentgl_rasterizer: Apply just the needed state on Clear (diff)
downloadyuzu-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/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp8
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);