mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #3967 from raven02/patch-17
Quick fix FF4 CC missing title text in framebuffer-to-memory mode
This commit is contained in:
commit
add0350b56
2 changed files with 13 additions and 20 deletions
|
@ -907,8 +907,7 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s
|
||||||
#ifdef USING_GLES2
|
#ifdef USING_GLES2
|
||||||
PackFramebufferSync_(nvfb); // synchronous glReadPixels
|
PackFramebufferSync_(nvfb); // synchronous glReadPixels
|
||||||
#else
|
#else
|
||||||
if(gl_extensions.PBO_ARB || !gl_extensions.ATIClampBug)
|
if(gl_extensions.PBO_ARB || !gl_extensions.ATIClampBug) {
|
||||||
{
|
|
||||||
if(!sync) {
|
if(!sync) {
|
||||||
PackFramebufferAsync_(nvfb); // asynchronous glReadPixels using PBOs
|
PackFramebufferAsync_(nvfb); // asynchronous glReadPixels using PBOs
|
||||||
} else {
|
} else {
|
||||||
|
@ -1304,9 +1303,10 @@ void FramebufferManager::DecimateFBOs() {
|
||||||
VirtualFramebuffer *vfb = vfbs_[i];
|
VirtualFramebuffer *vfb = vfbs_[i];
|
||||||
int age = frameLastFramebufUsed - std::max(vfb->last_frame_render, vfb->last_frame_used);
|
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 && vfb == displayFramebuf_)
|
||||||
if(updateVram && age == 0 && !vfb->memoryUpdated)
|
|
||||||
ReadFramebufferToMemory(vfb);
|
ReadFramebufferToMemory(vfb);
|
||||||
|
|
||||||
|
if (vfb == displayFramebuf_ || vfb == prevDisplayFramebuf_ || vfb == prevPrevDisplayFramebuf_) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,6 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V
|
||||||
if (entry->format != framebuffer->format) {
|
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, "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 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);
|
AttachFramebufferInvalid(entry, framebuffer);
|
||||||
} else {
|
} else {
|
||||||
AttachFramebufferValid(entry, framebuffer);
|
AttachFramebufferValid(entry, framebuffer);
|
||||||
|
@ -211,8 +210,6 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V
|
||||||
if (framebuffer->format != entry->format) {
|
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, "Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address);
|
||||||
// TODO: Use an FBO to translate the palette?
|
// 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);
|
AttachFramebufferValid(entry, framebuffer);
|
||||||
} else if ((entry->addr - address) / entry->bufw < framebuffer->height) {
|
} else if ((entry->addr - address) / entry->bufw < framebuffer->height) {
|
||||||
WARN_LOG_REPORT_ONCE(subarea, G3D, "Render to area containing texture at %08x", address);
|
WARN_LOG_REPORT_ONCE(subarea, G3D, "Render to area containing texture at %08x", address);
|
||||||
|
@ -514,11 +511,8 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||||
|
|
||||||
//Workaround to fix a clamping bug in pre-HD ATI/AMD drivers
|
//Workaround to fix a clamping bug in pre-HD ATI/AMD drivers
|
||||||
if (gl_extensions.ATIClampBug && entry.framebuffer)
|
if (gl_extensions.ATIClampBug && entry.framebuffer)
|
||||||
{
|
|
||||||
return;
|
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);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, sClamp ? GL_CLAMP_TO_EDGE : GL_REPEAT);
|
||||||
entry.sClamp = sClamp;
|
entry.sClamp = sClamp;
|
||||||
|
@ -528,7 +522,6 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||||
entry.tClamp = tClamp;
|
entry.tClamp = tClamp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void ConvertColors(void *dstBuf, const void *srcBuf, GLuint dstFmt, int numPixels) {
|
static void ConvertColors(void *dstBuf, const void *srcBuf, GLuint dstFmt, int numPixels) {
|
||||||
const u32 *src = (const u32 *)srcBuf;
|
const u32 *src = (const u32 *)srcBuf;
|
||||||
|
|
Loading…
Add table
Reference in a new issue