summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-30 23:03:07 +0200
committerGitHub <noreply@github.com>2020-03-30 23:03:07 +0200
commit4c72190a062e8df53f4602986ca1139deb9669a7 (patch)
tree1920ef4fb161d5e306d12fe6aa962d965d2a1649
parentMerge pull request #3568 from bunnei/time-calcspan (diff)
parentgl_rasterizer: Update stencil test regardless of it being disabled (diff)
downloadyuzu-4c72190a062e8df53f4602986ca1139deb9669a7.tar
yuzu-4c72190a062e8df53f4602986ca1139deb9669a7.tar.gz
yuzu-4c72190a062e8df53f4602986ca1139deb9669a7.tar.bz2
yuzu-4c72190a062e8df53f4602986ca1139deb9669a7.tar.lz
yuzu-4c72190a062e8df53f4602986ca1139deb9669a7.tar.xz
yuzu-4c72190a062e8df53f4602986ca1139deb9669a7.tar.zst
yuzu-4c72190a062e8df53f4602986ca1139deb9669a7.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 826eee7df..31add708f 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -444,6 +444,7 @@ void RasterizerOpenGL::Clear() {
}
SyncRasterizeEnable();
+ SyncStencilTestState();
if (regs.clear_flags.scissor) {
SyncScissorTest();
@@ -1052,12 +1053,8 @@ void RasterizerOpenGL::SyncStencilTestState() {
flags[Dirty::StencilTest] = false;
const auto& regs = gpu.regs;
- if (!regs.stencil_enable) {
- glDisable(GL_STENCIL_TEST);
- return;
- }
+ oglEnable(GL_STENCIL_TEST, regs.stencil_enable);
- glEnable(GL_STENCIL_TEST);
glStencilFuncSeparate(GL_FRONT, MaxwellToGL::ComparisonOp(regs.stencil_front_func_func),
regs.stencil_front_func_ref, regs.stencil_front_func_mask);
glStencilOpSeparate(GL_FRONT, MaxwellToGL::StencilOp(regs.stencil_front_op_fail),