Merge pull request #15843 from unknownbrackets/gpu-minor

GPU: Skip fb create upload when clearing
This commit is contained in:
Henrik Rydgård 2022-08-16 00:05:10 +02:00 committed by GitHub
commit 5f9718ef92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -472,7 +472,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);