From 73bcf1661223c7be64e9699b96bf491829ef86fc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 17 Jan 2016 12:30:51 -0800 Subject: [PATCH] Flush before loading the CLUT. In case it's what was being rendered to. --- GPU/Directx9/FramebufferDX9.cpp | 3 +++ GPU/GLES/Framebuffer.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/GPU/Directx9/FramebufferDX9.cpp b/GPU/Directx9/FramebufferDX9.cpp index 7af5ab47c9..63f61d3eef 100644 --- a/GPU/Directx9/FramebufferDX9.cpp +++ b/GPU/Directx9/FramebufferDX9.cpp @@ -862,6 +862,9 @@ namespace DX9 { int w = std::min(pixels % vfb->fb_stride, (int)vfb->width); int h = std::min((pixels + vfb->fb_stride - 1) / vfb->fb_stride, (int)vfb->height); + // We might still have a pending draw to the fb in question, flush if so. + FlushBeforeCopy(); + // No need to download if we already have it. if (!vfb->memoryUpdated && vfb->clutUpdatedBytes < loadBytes) { // We intentionally don't call OptimizeDownloadRange() here - we don't want to over download. diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index a9e1401a45..3fbc371f57 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1173,6 +1173,9 @@ void FramebufferManager::DownloadFramebufferForClut(u32 fb_address, u32 loadByte int w = std::min(pixels % vfb->fb_stride, (int)vfb->width); int h = std::min((pixels + vfb->fb_stride - 1) / vfb->fb_stride, (int)vfb->height); + // We might still have a pending draw to the fb in question, flush if so. + FlushBeforeCopy(); + // No need to download if we already have it. if (!vfb->memoryUpdated && vfb->clutUpdatedBytes < loadBytes) { // We intentionally don't call OptimizeDownloadRange() here - we don't want to over download.