summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-07-02 21:02:46 -0500
committerSubv <subv2112@gmail.com>2018-07-02 21:02:46 -0500
commit65c664560c244da9a5da650c61b8dbe5a323c2ba (patch)
tree8a4d48c7d7320fdcc684b1f6c6ca1daf46183c66 /src
parent92c713506542d5e628a5495943792b11e8de5c20 (diff)
GPU: Don't try to parse the depth test function if the depth test is disabled.
Diffstat (limited to 'src')
-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);
}