From 6c1017c45e30e165b2b7cd47b8b8edfefb47d378 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 29 Sep 2013 10:30:25 +0800 Subject: [PATCH] Render-to-texture : Remove no longer valid game list comments --- GPU/GLES/Framebuffer.cpp | 18 +++++++++--------- GPU/GLES/TextureCache.cpp | 15 ++++----------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 3f808dfe48..d2c4f044be 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -907,14 +907,13 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s #ifdef USING_GLES2 PackFramebufferSync_(nvfb); // synchronous glReadPixels #else - if(gl_extensions.PBO_ARB || !gl_extensions.ATIClampBug) - { - if(!sync) { - PackFramebufferAsync_(nvfb); // asynchronous glReadPixels using PBOs - } else { - PackFramebufferSync_(nvfb); // synchronous glReadPixels + if(gl_extensions.PBO_ARB || !gl_extensions.ATIClampBug) { + if(!sync) { + PackFramebufferAsync_(nvfb); // asynchronous glReadPixels using PBOs + } else { + PackFramebufferSync_(nvfb); // synchronous glReadPixels + } } - } #endif } } @@ -1304,9 +1303,10 @@ void FramebufferManager::DecimateFBOs() { VirtualFramebuffer *vfb = vfbs_[i]; int age = frameLastFramebufUsed - std::max(vfb->last_frame_render, vfb->last_frame_used); - if (vfb == displayFramebuf_ || vfb == prevDisplayFramebuf_ || vfb == prevPrevDisplayFramebuf_) { - if(updateVram && age == 0 && !vfb->memoryUpdated) + if(updateVram && age == 0 && !vfb->memoryUpdated && vfb == displayFramebuf_) ReadFramebufferToMemory(vfb); + + if (vfb == displayFramebuf_ || vfb == prevDisplayFramebuf_ || vfb == prevPrevDisplayFramebuf_) { continue; } diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index f84e72b869..a3be8939eb 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -189,7 +189,6 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V if (entry->format != framebuffer->format) { 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); } else { AttachFramebufferValid(entry, framebuffer); @@ -211,8 +210,6 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V 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); // 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' , AttachFramebufferValid(entry, framebuffer); } else if ((entry->addr - address) / entry->bufw < framebuffer->height) { WARN_LOG_REPORT_ONCE(subarea, G3D, "Render to area containing texture at %08x", address); @@ -514,19 +511,15 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) { //Workaround to fix a clamping bug in pre-HD ATI/AMD drivers if (gl_extensions.ATIClampBug && entry.framebuffer) - { return; - } - else - { - if (force || entry.sClamp != sClamp) { + + if (force || entry.sClamp != sClamp) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, sClamp ? GL_CLAMP_TO_EDGE : GL_REPEAT); entry.sClamp = sClamp; - } - if (force || entry.tClamp != tClamp) { + } + if (force || entry.tClamp != tClamp) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, tClamp ? GL_CLAMP_TO_EDGE : GL_REPEAT); entry.tClamp = tClamp; - } } }