summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2016-11-27 18:30:03 +0100
committerSubv <subv2112@gmail.com>2016-11-27 19:09:11 +0100
commit46234150263c105bb6d1fbcbd45b8c324d108a99 (patch)
treeb8952ee6c0ab6b8ef94fe2bbd32285554d60ca59 /src/video_core
parentRasterizer/Memfill: Set the correct stencil write mask when clearing the stencil buffer. (diff)
downloadyuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.tar
yuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.tar.gz
yuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.tar.bz2
yuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.tar.lz
yuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.tar.xz
yuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.tar.zst
yuzu-46234150263c105bb6d1fbcbd45b8c324d108a99.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp4
2 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 062f8a67b..d4d5903ce 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -893,7 +893,7 @@ bool RasterizerOpenGL::AccelerateFill(const GPU::Regs::MemoryFillConfig& config)
value_float = config.value_32bit / 16777215.0f; // 2^24 - 1
}
- cur_state.depth.write_mask = true;
+ cur_state.depth.write_mask = GL_TRUE;
cur_state.Apply();
glClearBufferfv(GL_DEPTH, 0, &value_float);
} else if (dst_type == SurfaceType::DepthStencil) {
@@ -908,7 +908,7 @@ bool RasterizerOpenGL::AccelerateFill(const GPU::Regs::MemoryFillConfig& config)
GLfloat value_float = (config.value_32bit & 0xFFFFFF) / 16777215.0f; // 2^24 - 1
GLint value_int = (config.value_32bit >> 24);
- cur_state.depth.write_mask = true;
+ cur_state.depth.write_mask = GL_TRUE;
cur_state.stencil.write_mask = 0xFF;
cur_state.Apply();
glClearBufferfi(GL_DEPTH_STENCIL, 0, value_float, value_int);
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index ed84cadea..2a731f483 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -27,8 +27,8 @@ OpenGLState::OpenGLState() {
stencil.test_enabled = false;
stencil.test_func = GL_ALWAYS;
stencil.test_ref = 0;
- stencil.test_mask = -1;
- stencil.write_mask = -1;
+ stencil.test_mask = 0xFF;
+ stencil.write_mask = 0xFF;
stencil.action_depth_fail = GL_KEEP;
stencil.action_depth_pass = GL_KEEP;
stencil.action_stencil_fail = GL_KEEP;