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:
parent
7f4da9b567
commit
0956fa3ff6
5 changed files with 9 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue