mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
GPU: Always update size when shrinking.
Previously, we only updated size when we didn't need to recreate. This would sometimes cause it to recreate over and over, hurting perf.
This commit is contained in:
1 parent
ef092c3a42
commit
b4d55713cb
1 file changed
+6
-4
@@ -470,16 +470,18 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(Framebuffer
|
||||
bool needsRecreate = vfb->bufferWidth > params.fb_stride;
|
||||
needsRecreate = needsRecreate || vfb->newWidth > vfb->bufferWidth || vfb->newWidth * 2 < vfb->bufferWidth;
|
||||
needsRecreate = needsRecreate || vfb->newHeight > vfb->bufferHeight || vfb->newHeight * 2 < vfb->bufferHeight;
|
||||
|
||||
// Whether we resize or not, change the size parameters so we stop detecting a resize.
|
||||
// It might be larger if all drawing has been in throughmode.
|
||||
vfb->width = drawing_width;
|
||||
vfb->height = drawing_height;
|
||||
|
||||
if (needsRecreate) {
|
||||
ResizeFramebufFBO(vfb, vfb->width, vfb->height, true);
|
||||
resized = true;
|
||||
// Let's discard this information, might be wrong now.
|
||||
vfb->safeWidth = 0;
|
||||
vfb->safeHeight = 0;
|
||||
} else {
|
||||
// Even though we won't resize it, let's at least change the size params.
|
||||
vfb->width = drawing_width;
|
||||
vfb->height = drawing_height;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user