Address feedback, change roles of the two dynamic clut fbos to eliminate the need for state (see next commit)

This commit is contained in:
Henrik Rydgård committed 2022-09-15 09:15:02 +02:00
1 parent 9c2bfad749
commit 36c98ab367
4 files changed
+23 -22

No files matched your search

+5 -2
View File
@@ -557,11 +557,14 @@ void FramebufferManagerCommon::SetDepthFrameBuffer(bool isClearingDepth) {
// Set the flag, then upload memory contents to depth channel.
// Sanity check the depth buffer pointer.
if (currentRenderVfb_->z_address != 0 && currentRenderVfb_->z_address != currentRenderVfb_->fb_address) {
const u16 *src = (const u16 *)Memory::GetPointerUnchecked(currentRenderVfb_->z_address);
DrawPixels(currentRenderVfb_, 0, 0, (const u8 *)src, GE_FORMAT_DEPTH16, currentRenderVfb_->z_stride, currentRenderVfb_->width, currentRenderVfb_->height, RASTER_DEPTH, "Depth Upload");
if (Memory::IsValidRange(currentRenderVfb_->z_address, currentRenderVfb_->width * 2)) {
const u16 *src = (const u16 *)Memory::GetPointerUnchecked(currentRenderVfb_->z_address);
DrawPixels(currentRenderVfb_, 0, 0, (const u8 *)src, GE_FORMAT_DEPTH16, currentRenderVfb_->z_stride, currentRenderVfb_->width, currentRenderVfb_->height, RASTER_DEPTH, "Depth Upload");
}
}
}
}
// First time use of this framebuffer's depth buffer.
currentRenderVfb_->usageFlags |= FB_USAGE_RENDER_DEPTH;