From b9f805c71f6b86fc04c024180da8c1d332c8a551 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 11 Jun 2014 00:54:54 -0700 Subject: [PATCH] Fix graphical artifact in Jeanne d'Arc world map. We need to use the last set render framebuffer, not the current one at copy to output. --- GPU/GLES/Framebuffer.cpp | 8 ++++---- GPU/GLES/GLES_GPU.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index cbbcbe260b..94972849d4 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1441,8 +1441,7 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s } #endif - // Null out currentRenderVfb_ so it gets set again properly. - currentRenderVfb_ = NULL; + RebindFramebuffer(); } } @@ -1968,7 +1967,6 @@ void FramebufferManager::UpdateFromMemory(u32 addr, int size, bool safe) { if (MaskedEqual(vfb->fb_address, addr)) { FlushBeforeCopy(); fbo_unbind(); - currentRenderVfb_ = 0; vfb->dirtyAfterDisplay = true; vfb->reallyDirtyAfterDisplay = true; @@ -1993,8 +1991,10 @@ void FramebufferManager::UpdateFromMemory(u32 addr, int size, bool safe) { } } - if (needUnbind) + if (needUnbind) { fbo_unbind(); + } + RebindFramebuffer(); } } diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index 3d14b41a5b..fdb9eda987 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -605,7 +605,7 @@ void GLES_GPU::CopyDisplayToOutput() { void GLES_GPU::CopyDisplayToOutputInternal() { // Flush anything left over. - framebufferManager_.SetRenderFrameBuffer(); + framebufferManager_.RebindFramebuffer(); transformDraw_.Flush(); glstate.depthWrite.set(GL_TRUE);