From 53663c00b931c675199ab9f0eb0d0af18083995d Mon Sep 17 00:00:00 2001 From: mimimi085181 Date: Thu, 29 Jun 2017 23:09:32 +0200 Subject: Implement minimal emulation of TMEM caching This is a remake of https://github.com/dolphin-emu/dolphin/pull/3749 Full credit goes to phire. Old message: "If none of the texture registers have changed and TMEM hasn't been invalidated or changed in other ways, we can blindly reuse the old texture cache entries without rehashing. Not only does this fix the bloom effect in Spyro: A Hero's Tail (The game abused texture cache) but it will also provide speedups for other games which use the same texture over multiple draw calls, especially when safe texture cache is in use." Changed the pr per phire's instructions to only return the current texture(s) if none of the texture registers were changed. If any texture register was changed, fall back to the default hashing and rebuilding textures from memory. --- Source/Core/VideoCommon/VertexManagerBase.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp') diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index b08f311c0a..b6088ab2e4 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -243,7 +243,6 @@ void VertexManagerBase::Flush() if (bpmem.tevind[i].IsActive() && bpmem.tevind[i].bt < bpmem.genMode.numindstages) usedtextures[bpmem.tevindref.getTexMap(bpmem.tevind[i].bt)] = true; - g_texture_cache->UnbindTextures(); for (unsigned int i : usedtextures) { const auto* tentry = g_texture_cache->Load(i); -- cgit v1.2.3