From bda964e0b97deef869260a0f12681c38f9528a68 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sun, 6 Sep 2015 03:13:44 +1200 Subject: [PATCH] Workaround to allow partial texture updates to keep working in NSMBWii --- Source/Core/VideoCommon/TextureCacheBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 21b2e792bd..8626749283 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1014,7 +1014,10 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat entry->hash = GetHash64(dst, (int)entry->size_in_bytes, g_ActiveConfig.iSafeTextureCache_ColorSamples); - // Invalidate all textures that overlap the range of our texture + // Invalidate all textures that overlap the range of our efb copy. + // Unless our efb copy has a weird stride, then we want avoid invalidating textures which + // we might be able to do a partial texture update on. + if (entry->memory_stride == entry->CacheLinesPerRow() * 32) { TexCache::iterator iter = textures_by_address.begin(); while (iter != textures_by_address.end())