From 0b22c9840450193a215498f7d9a9bd092bb3a248 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 14 Aug 2022 13:19:52 -0700 Subject: [PATCH] GPU: Skip fb create upload when clearing. This doesn't verify it's a full screen clear, but on a new framebuffer that's very very common. --- GPU/Common/FramebufferManagerCommon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 68920e2a12c3..036c67c22b0b 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -469,7 +469,8 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(const Frame vfbs_.push_back(vfb); currentRenderVfb_ = vfb; - if (useBufferedRendering_ && !g_Config.bDisableSlowFramebufEffects) { + // Assume that if we're clearing right when switching to a new framebuffer, we don't need to upload. + if (useBufferedRendering_ && !g_Config.bDisableSlowFramebufEffects && params.isDrawing) { gpu->PerformMemoryUpload(params.fb_address, byteSize); // Alpha was already done by PerformMemoryUpload. PerformStencilUpload(params.fb_address, byteSize, StencilUpload::STENCIL_IS_ZERO | StencilUpload::IGNORE_ALPHA);