summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2018-07-21 02:14:04 -0400
committerGravatar bunnei2018-07-21 21:51:06 -0400
commitd8c60029d6b0e8186db47ba14bb973a64d684d6a (patch)
tree18ca83548630ab7f49f1cfdca03626f43b222d40
parentmaxwell_3d: Add depth buffer enable, width, and height registers. (diff)
downloadyuzu-d8c60029d6b0e8186db47ba14bb973a64d684d6a.tar.gz
yuzu-d8c60029d6b0e8186db47ba14bb973a64d684d6a.tar.xz
yuzu-d8c60029d6b0e8186db47ba14bb973a64d684d6a.zip
gl_rasterizer: Use zeta_enable register to enable depth buffer.
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 65a2fd5e8..c4ce57f1c 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -387,7 +387,7 @@ void RasterizerOpenGL::Clear() {
387 } 387 }
388 if (regs.clear_buffers.Z) { 388 if (regs.clear_buffers.Z) {
389 clear_mask |= GL_DEPTH_BUFFER_BIT; 389 clear_mask |= GL_DEPTH_BUFFER_BIT;
390 use_depth_fb = true; 390 use_depth_fb = regs.zeta_enable != 0;
391 391
392 // Always enable the depth write when clearing the depth buffer. The depth write mask is 392 // Always enable the depth write when clearing the depth buffer. The depth write mask is
393 // ignored when clearing the buffer in the Switch, but OpenGL obeys it so we set it to true. 393 // ignored when clearing the buffer in the Switch, but OpenGL obeys it so we set it to true.
@@ -431,7 +431,7 @@ void RasterizerOpenGL::DrawArrays() {
431 ScopeAcquireGLContext acquire_context; 431 ScopeAcquireGLContext acquire_context;
432 432
433 auto [dirty_color_surface, dirty_depth_surface] = 433 auto [dirty_color_surface, dirty_depth_surface] =
434 ConfigureFramebuffers(true, regs.zeta.Address() != 0); 434 ConfigureFramebuffers(true, regs.zeta.Address() != 0 && regs.zeta_enable != 0);
435 435
436 SyncDepthTestState(); 436 SyncDepthTestState();
437 SyncBlendState(); 437 SyncBlendState();