From 65c664560c244da9a5da650c61b8dbe5a323c2ba Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 2 Jul 2018 21:02:46 -0500 Subject: GPU: Don't try to parse the depth test function if the depth test is disabled. --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/video_core') 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); } -- cgit v1.2.3