summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Valle <subv2112@gmail.com>2017-07-23 06:02:59 +0200
committerGitHub <noreply@github.com>2017-07-23 06:02:59 +0200
commite646bd902d85e4da3c160dd19014c780b2335f36 (patch)
treecca8511cf28e3dd48957a7f9596e3851333b60dc /src
parentMerge pull request #2799 from yuriks/virtual-cached-range-flush (diff)
parentgl_rasterizer_cache: depth write is disabled if allow_depth_stencil_write is false (diff)
downloadyuzu-e646bd902d85e4da3c160dd19014c780b2335f36.tar
yuzu-e646bd902d85e4da3c160dd19014c780b2335f36.tar.gz
yuzu-e646bd902d85e4da3c160dd19014c780b2335f36.tar.bz2
yuzu-e646bd902d85e4da3c160dd19014c780b2335f36.tar.lz
yuzu-e646bd902d85e4da3c160dd19014c780b2335f36.tar.xz
yuzu-e646bd902d85e4da3c160dd19014c780b2335f36.tar.zst
yuzu-e646bd902d85e4da3c160dd19014c780b2335f36.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 8b717e43d..f37894e7a 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -542,10 +542,11 @@ RasterizerCacheOpenGL::GetFramebufferSurfaces(
config.GetDepthBufferPhysicalAddress(),
fb_area * Pica::FramebufferRegs::BytesPerDepthPixel(config.depth_format));
bool using_color_fb = config.GetColorBufferPhysicalAddress() != 0;
- bool using_depth_fb =
- config.GetDepthBufferPhysicalAddress() != 0 &&
- (regs.framebuffer.output_merger.depth_test_enable ||
- regs.framebuffer.output_merger.depth_write_enable || !framebuffers_overlap);
+ bool depth_write_enable = regs.framebuffer.output_merger.depth_write_enable &&
+ regs.framebuffer.framebuffer.allow_depth_stencil_write;
+ bool using_depth_fb = config.GetDepthBufferPhysicalAddress() != 0 &&
+ (regs.framebuffer.output_merger.depth_test_enable || depth_write_enable ||
+ !framebuffers_overlap);
if (framebuffers_overlap && using_color_fb && using_depth_fb) {
LOG_CRITICAL(Render_OpenGL, "Color and depth framebuffer memory regions overlap; "