mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Restore the clearing optimization, avoiding unnecessary depth copies
This commit is contained in:
1 parent
12db0e52d4
commit
29ea3ffe0c
3 files changed
+8
-5
No files matched your search
@@ -497,13 +497,16 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(const Frame
|
||||
}
|
||||
|
||||
// Called on the first use of depth in a render pass.
|
||||
void FramebufferManagerCommon::SetDepthFrameBuffer() {
|
||||
void FramebufferManagerCommon::SetDepthFrameBuffer(bool isClearingDepth) {
|
||||
if (!currentRenderVfb_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// "Resolve" the depth buffer, by copying from any overlapping buffers with fresher content.
|
||||
CopyToDepthFromOverlappingFramebuffers(currentRenderVfb_);
|
||||
// If this first draw call is anything other than a clear, "resolve" the depth buffer,
|
||||
// by copying from any overlapping buffers with fresher content.
|
||||
if (!isClearingDepth) {
|
||||
CopyToDepthFromOverlappingFramebuffers(currentRenderVfb_);
|
||||
}
|
||||
|
||||
currentRenderVfb_->usageFlags |= FB_USAGE_RENDER_DEPTH;
|
||||
currentRenderVfb_->depthBindSeq = GetBindSeqCount();
|
||||
|
||||
Reference in new issue
Block a user