From ed6e4b7764ed064f3d9b1aa8ae9dd4fbbb78fc00 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sat, 21 Sep 2013 09:56:32 +0800 Subject: [PATCH 1/2] Simplify the exact match return condition by inverse it . --- GPU/GLES/TextureCache.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 0e1214434d..c09e9d2be3 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -178,17 +178,13 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V // If they match exactly, it's non-CLUT and from the top left. if (exactMatch) { // Apply to non-buffered and buffered mode only. -#ifndef USING_GLES2 - if ((g_Config.iRenderingMode == FB_READFBOMEMORY_CPU) || (g_Config.iRenderingMode == FB_READFBOMEMORY_GPU)) -#else - if (g_Config.iRenderingMode == FB_READFBOMEMORY_GPU) -#endif + if (!(g_Config.iRenderingMode == FB_NON_BUFFERED_MODE || g_Config.iRenderingMode == FB_BUFFERED_MODE)) return; DEBUG_LOG(G3D, "Render to texture detected at %08x!", address); if (!entry->framebuffer || entry->invalidHint == -1) { if (entry->format != framebuffer->format) { - WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Render to texture with different formats %d != %d", entry->format, framebuffer->format); + WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Non-CLUT: Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address); // If it already has one, let's hope that one is correct. // If "AttachFramebufferValid" , Evangelion Jo and Kurohyou 2 will be 'blue background' in-game AttachFramebufferInvalid(entry, framebuffer); @@ -198,7 +194,7 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V // TODO: Delete the original non-fbo texture too. } } else { - // Apply to buffered mode only while memory mode should be more accurate itself for offset/palette etc. + // Apply to buffered mode only. if (!(g_Config.iRenderingMode == FB_BUFFERED_MODE)) return; @@ -210,7 +206,7 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V // Is it at least the right stride? if (framebuffer->fb_stride == entry->bufw && compatFormat) { if (framebuffer->format != entry->format) { - WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address); + WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "CLUT : Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address); // TODO: Use an FBO to translate the palette? // If 'AttachFramebufferInvalid' , Kurohyou 2 will be missing battle scene in-game and FF Type-0 will have black box shadow/'blue fog' and 3rd birthday will have 'blue fog' // If 'AttachFramebufferValid' , DBZ VS Tag will have 'burning effect' , From bdb9bcb27aa693c98383dbb3587b8bd017a616c3 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sat, 21 Sep 2013 10:13:30 +0800 Subject: [PATCH 2/2] Keep using the old report format --- GPU/GLES/TextureCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index c09e9d2be3..f74b81d417 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -184,7 +184,7 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V DEBUG_LOG(G3D, "Render to texture detected at %08x!", address); if (!entry->framebuffer || entry->invalidHint == -1) { if (entry->format != framebuffer->format) { - WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Non-CLUT: Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address); + WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Render to texture with different formats %d != %d", entry->format, framebuffer->format); // If it already has one, let's hope that one is correct. // If "AttachFramebufferValid" , Evangelion Jo and Kurohyou 2 will be 'blue background' in-game AttachFramebufferInvalid(entry, framebuffer); @@ -206,7 +206,7 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V // Is it at least the right stride? if (framebuffer->fb_stride == entry->bufw && compatFormat) { if (framebuffer->format != entry->format) { - WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "CLUT : Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address); + WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address); // TODO: Use an FBO to translate the palette? // If 'AttachFramebufferInvalid' , Kurohyou 2 will be missing battle scene in-game and FF Type-0 will have black box shadow/'blue fog' and 3rd birthday will have 'blue fog' // If 'AttachFramebufferValid' , DBZ VS Tag will have 'burning effect' ,