gl_rasterizer_cache: depth write is disabled if allow_depth_stencil_write is false
This commit is contained in:
parent
8c22334f96
commit
b3b9468573
|
@ -542,10 +542,11 @@ RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
||||||
config.GetDepthBufferPhysicalAddress(),
|
config.GetDepthBufferPhysicalAddress(),
|
||||||
fb_area * Pica::FramebufferRegs::BytesPerDepthPixel(config.depth_format));
|
fb_area * Pica::FramebufferRegs::BytesPerDepthPixel(config.depth_format));
|
||||||
bool using_color_fb = config.GetColorBufferPhysicalAddress() != 0;
|
bool using_color_fb = config.GetColorBufferPhysicalAddress() != 0;
|
||||||
bool using_depth_fb =
|
bool depth_write_enable = regs.framebuffer.output_merger.depth_write_enable &&
|
||||||
config.GetDepthBufferPhysicalAddress() != 0 &&
|
regs.framebuffer.framebuffer.allow_depth_stencil_write;
|
||||||
(regs.framebuffer.output_merger.depth_test_enable ||
|
bool using_depth_fb = config.GetDepthBufferPhysicalAddress() != 0 &&
|
||||||
regs.framebuffer.output_merger.depth_write_enable || !framebuffers_overlap);
|
(regs.framebuffer.output_merger.depth_test_enable || depth_write_enable ||
|
||||||
|
!framebuffers_overlap);
|
||||||
|
|
||||||
if (framebuffers_overlap && using_color_fb && using_depth_fb) {
|
if (framebuffers_overlap && using_color_fb && using_depth_fb) {
|
||||||
LOG_CRITICAL(Render_OpenGL, "Color and depth framebuffer memory regions overlap; "
|
LOG_CRITICAL(Render_OpenGL, "Color and depth framebuffer memory regions overlap; "
|
||||||
|
|
Reference in New Issue