From 2dd9e6bfe22135277d9a76f175784a6e6d0f6bef Mon Sep 17 00:00:00 2001 From: mimimi085181 Date: Sun, 27 Mar 2016 04:13:20 +0200 Subject: [PATCH] Remove the restriction to apply efb copies only once as partial update I'm not entirely sure what is happening, but this optimisation is causing an issue in Sonic Riders: Zero Gravity. Apparently the issue would also be fixed by PR#3747, but this PR should also fix similar issues. Games that use partial updates might get slower with this, so some performance regression testing would be nice. Games like New Super Mario Bros, RS2, Zelda TP and Silent Hill. Testing with high graphics settings makes sense, since this would mostly end up in more work for the GPU. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 1707be49cb18..9673ebf14169 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -308,7 +308,6 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::DoPartialTextureUpdates(Tex if (entry != entry_to_update && entry->IsEfbCopy() && entry->OverlapsMemoryRange(entry_to_update->addr, entry_to_update->size_in_bytes) - && entry->frameCount == FRAMECOUNT_INVALID && entry->memory_stride == numBlocksX * block_size) { if (entry->hash == entry->CalculateHash()) @@ -367,8 +366,8 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::DoPartialTextureUpdates(Tex dstrect.right = (dst_x + copy_width); dstrect.bottom = (dst_y + copy_height); entry_to_update->CopyRectangleFromTexture(entry, srcrect, dstrect); - // Mark the texture update as used, so it isn't applied more than once - entry->frameCount = frameCount; + // Mark the texture update as used, as if it was loaded directly + entry->frameCount = FRAMECOUNT_INVALID; } else {