GPU: Reduce depth blits when not updated.

If the game initially clears the depth in a buffer, but then never uses
that depth again, don't keep blitting depth.

Improves #8538, by preventing the depth blits in this case.
This commit is contained in:
Unknown W. Brackets committed 2017-12-24 11:52:15 -08:00
1 parent 7f4da9b567
commit 0956fa3ff6
5 files changed
+9 -5

No files matched your search

+1
View File
@@ -412,6 +412,7 @@ void FramebufferManagerVulkan::BlitFramebufferDepth(VirtualFramebuffer *src, Vir
if (matchingDepthBuffer && matchingRenderSize && matchingSize) {
// TODO: Currently, this copies depth AND stencil, which is a problem. See #9740.
draw_->CopyFramebufferImage(src->fbo, 0, 0, 0, 0, dst->fbo, 0, 0, 0, 0, src->renderWidth, src->renderHeight, 1, Draw::FB_DEPTH_BIT);
dst->last_frame_depth_updated = gpuStats.numFlips;
} else if (matchingDepthBuffer && matchingSize) {
/*
int w = std::min(src->renderWidth, dst->renderWidth);