summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-11-07 04:27:12 +0100
committerRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-11-11 20:31:00 +0100
commit4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a (patch)
tree6c562c3140257de2d510ab67aff43f02af11c7a0 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentset sampler max lod, min lod, lod bias and max anisotropy (diff)
downloadyuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.tar
yuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.tar.gz
yuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.tar.bz2
yuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.tar.lz
yuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.tar.xz
yuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.tar.zst
yuzu-4a6eff3b7b0cf8578ac8e23fe47dae52c7fb350a.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 40f474e07..8dd7bd514 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -996,9 +996,6 @@ void RasterizerOpenGL::SyncStencilTestState() {
return;
}
- // TODO(bunnei): Verify behavior when this is not set
- ASSERT(regs.stencil_two_side_enable);
-
state.stencil.front.test_func = MaxwellToGL::ComparisonOp(regs.stencil_front_func_func);
state.stencil.front.test_ref = regs.stencil_front_func_ref;
state.stencil.front.test_mask = regs.stencil_front_func_mask;
@@ -1006,7 +1003,7 @@ void RasterizerOpenGL::SyncStencilTestState() {
state.stencil.front.action_depth_fail = MaxwellToGL::StencilOp(regs.stencil_front_op_zfail);
state.stencil.front.action_depth_pass = MaxwellToGL::StencilOp(regs.stencil_front_op_zpass);
state.stencil.front.write_mask = regs.stencil_front_mask;
-
+ if (regs.stencil_two_side_enable) {
state.stencil.back.test_func = MaxwellToGL::ComparisonOp(regs.stencil_back_func_func);
state.stencil.back.test_ref = regs.stencil_back_func_ref;
state.stencil.back.test_mask = regs.stencil_back_func_mask;
@@ -1014,6 +1011,15 @@ void RasterizerOpenGL::SyncStencilTestState() {
state.stencil.back.action_depth_fail = MaxwellToGL::StencilOp(regs.stencil_back_op_zfail);
state.stencil.back.action_depth_pass = MaxwellToGL::StencilOp(regs.stencil_back_op_zpass);
state.stencil.back.write_mask = regs.stencil_back_mask;
+ } else {
+ state.stencil.back.test_func = GL_ALWAYS;
+ state.stencil.back.test_ref = 0;
+ state.stencil.back.test_mask = 0xFFFFFFFF;
+ state.stencil.back.write_mask = 0xFFFFFFFF;
+ state.stencil.back.action_stencil_fail = GL_KEEP;
+ state.stencil.back.action_depth_fail = GL_KEEP;
+ state.stencil.back.action_depth_pass = GL_KEEP;
+ }
}
void RasterizerOpenGL::SyncColorMask() {