mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-07 22:37:15 +00:00
Merge pull request #7626 from sum2012/GPU-minor
GPU:Avoid "decimate" the usageFlags corrupted memory
This commit is contained in:
commit
79fc557ad1
@ -1150,6 +1150,10 @@ namespace DX9 {
|
||||
ReadFramebufferToMemory(vfb, false, 0, 0, vfb->width, vfb->height);
|
||||
}
|
||||
|
||||
|
||||
// Let's also "decimate" the usageFlags.
|
||||
UpdateFramebufUsage(vfb);
|
||||
|
||||
if (vfb != displayFramebuf_ && vfb != prevDisplayFramebuf_ && vfb != prevPrevDisplayFramebuf_) {
|
||||
if (age > FBO_OLD_AGE) {
|
||||
INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age);
|
||||
@ -1157,9 +1161,6 @@ namespace DX9 {
|
||||
vfbs_.erase(vfbs_.begin() + i--);
|
||||
}
|
||||
}
|
||||
|
||||
// Let's also "decimate" the usageFlags.
|
||||
UpdateFramebufUsage(vfb);
|
||||
}
|
||||
|
||||
for (auto it = tempFBOs_.begin(); it != tempFBOs_.end(); ) {
|
||||
|
@ -1854,6 +1854,9 @@ void FramebufferManager::DecimateFBOs() {
|
||||
ReadFramebufferToMemory(vfb, sync, 0, 0, vfb->width, vfb->height);
|
||||
}
|
||||
|
||||
// Let's also "decimate" the usageFlags.
|
||||
UpdateFramebufUsage(vfb);
|
||||
|
||||
if (vfb != displayFramebuf_ && vfb != prevDisplayFramebuf_ && vfb != prevPrevDisplayFramebuf_) {
|
||||
if (age > FBO_OLD_AGE) {
|
||||
INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age);
|
||||
@ -1861,9 +1864,6 @@ void FramebufferManager::DecimateFBOs() {
|
||||
vfbs_.erase(vfbs_.begin() + i--);
|
||||
}
|
||||
}
|
||||
|
||||
// Let's also "decimate" the usageFlags.
|
||||
UpdateFramebufUsage(vfb);
|
||||
}
|
||||
|
||||
for (auto it = tempFBOs_.begin(); it != tempFBOs_.end(); ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user