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.
This commit is contained in:
Unknown W. Brackets 2022-08-14 13:19:52 -07:00
parent a35d261908
commit 0b22c98404

View file

@ -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);