From f4458edc76715fadefd473514c73c1136eabc5ce Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 13 Apr 2014 21:11:17 -0700 Subject: [PATCH] Avoid unbinding the current fbo on block transfer. Improves God of War performance by 25% (at least in the demo.) --- GPU/GLES/Framebuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 8871eaf57f..8105d237e5 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1674,13 +1674,13 @@ void FramebufferManager::UpdateFromMemory(u32 addr, int size, bool safe) { if (!Memory::IsValidAddress(displayFramebufPtr_)) return; - fbo_unbind(); - currentRenderVfb_ = 0; - bool needUnbind = false; for (size_t i = 0; i < vfbs_.size(); ++i) { VirtualFramebuffer *vfb = vfbs_[i]; if (MaskedEqual(vfb->fb_address, addr)) { + fbo_unbind(); + currentRenderVfb_ = 0; + vfb->dirtyAfterDisplay = true; vfb->reallyDirtyAfterDisplay = true; // TODO: This without the fbo_unbind() above would be better than destroying the FBO.