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 2017-12-24 11:52:15 -08:00
parent 7f4da9b567
commit 0956fa3ff6
5 changed files with 9 additions and 5 deletions

View file

@ -529,7 +529,7 @@ void FramebufferManagerGLES::BlitFramebufferDepth(VirtualFramebuffer *src, Virtu
// Let's only do this if not clearing depth.
glstate.scissorTest.force(false);
draw_->BlitFramebuffer(src->fbo, 0, 0, w, h, dst->fbo, 0, 0, w, h, Draw::FB_DEPTH_BIT, Draw::FB_BLIT_NEAREST);
// WARNING: If we set dst->depthUpdated here, our optimization above would be pointless.
dst->last_frame_depth_updated = gpuStats.numFlips;
glstate.scissorTest.restore();
}
}