summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-29 03:58:30 +0100
committerbunnei <bunneidev@gmail.com>2018-11-30 02:10:11 +0100
commit0f43564d09fbf6a55bfe846f763aa8c50e53f551 (patch)
tree7fb1f61908f7b8c65dea527790aef8778e773175 /src
parentgl_rasterizer_cache: Remove BlitSurface and replace with more accurate copy. (diff)
downloadyuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.tar
yuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.tar.gz
yuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.tar.bz2
yuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.tar.lz
yuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.tar.xz
yuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.tar.zst
yuzu-0f43564d09fbf6a55bfe846f763aa8c50e53f551.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 6b024d9d0..2fbc753af 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);
}