mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 02:33:43 +01:00
Simplify the exact match return condition by inverse it .
This commit is contained in:
1 parent
a1f3591960
commit
ed6e4b7764
1 file changed
+4
-8
@@ -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' ,
|
||||
|
||||
Reference in new issue
Block a user