diff options
author | Sebastian Valle <subv2112@gmail.com> | 2017-07-23 06:02:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-23 06:02:59 +0200 |
commit | e646bd902d85e4da3c160dd19014c780b2335f36 (patch) | |
tree | cca8511cf28e3dd48957a7f9596e3851333b60dc /src | |
parent | Merge pull request #2799 from yuriks/virtual-cached-range-flush (diff) | |
parent | gl_rasterizer_cache: depth write is disabled if allow_depth_stencil_write is false (diff) | |
download | yuzu-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.cpp | 9 |
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; " |