From 0f43564d09fbf6a55bfe846f763aa8c50e53f551 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 28 Nov 2018 21:58:30 -0500 Subject: [PATCH] gl_rasterizer_cache: Update AccurateCopySurface to flush complete source surface. - Fixes issues with Breath of the Wild with use_accurate_gpu_emulation setting. --- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 6b024d9d01..2fbc753af6 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -1031,7 +1031,10 @@ void RasterizerCacheOpenGL::AccurateCopySurface(const Surface& src_surface, const Surface& dst_surface) { const auto& src_params{src_surface->GetSurfaceParams()}; const auto& dst_params{dst_surface->GetSurfaceParams()}; - FlushRegion(src_params.addr, dst_params.MemorySize()); + + // Flush enough memory for both the source and destination surface + FlushRegion(src_params.addr, std::max(src_params.MemorySize(), dst_params.MemorySize())); + LoadSurface(dst_surface); }