summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-07-03 04:02:46 +0200
committerSubv <subv2112@gmail.com>2018-07-03 04:02:46 +0200
commit65c664560c244da9a5da650c61b8dbe5a323c2ba (patch)
tree8a4d48c7d7320fdcc684b1f6c6ca1daf46183c66
parentMerge pull request #608 from Subv/depth (diff)
downloadyuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.tar
yuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.tar.gz
yuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.tar.bz2
yuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.tar.lz
yuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.tar.xz
yuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.tar.zst
yuzu-65c664560c244da9a5da650c61b8dbe5a323c2ba.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index ca3814cfc..1ced31e84 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -735,6 +735,10 @@ void RasterizerOpenGL::SyncDepthTestState() {
state.depth.test_enabled = regs.depth_test_enable != 0;
state.depth.write_mask = regs.depth_write_enabled ? GL_TRUE : GL_FALSE;
+
+ if (!state.depth.test_enabled)
+ return;
+
state.depth.test_func = MaxwellToGL::ComparisonOp(regs.depth_test_func);
}