summaryrefslogtreecommitdiffstats
path: root/src/video_core/memory_manager.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-01-21 23:08:43 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2021-01-21 23:16:06 +0100
commit0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7 (patch)
tree9335990fbbea3bcfb81d26744dd1eef3916adf4a /src/video_core/memory_manager.cpp
parentvideo_core/memory_manager: Add GPU address based flush method (diff)
downloadyuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.tar
yuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.tar.gz
yuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.tar.bz2
yuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.tar.lz
yuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.tar.xz
yuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.tar.zst
yuzu-0e9a6759f90cd45ef708c17b2fb1f74db5c8fce7.zip
Diffstat (limited to 'src/video_core/memory_manager.cpp')
-rw-r--r--src/video_core/memory_manager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index 1926bb025..e5d357773 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -332,6 +332,10 @@ void MemoryManager::FlushRegion(GPUVAddr gpu_addr, size_t size) const {
void MemoryManager::CopyBlock(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, std::size_t size) {
std::vector<u8> tmp_buffer(size);
ReadBlock(gpu_src_addr, tmp_buffer.data(), size);
+
+ // The output block must be flushed in case it has data modified from the GPU.
+ // Fixes NPC geometry in Zombie Panic in Wonderland DX
+ FlushRegion(gpu_dest_addr, size);
WriteBlock(gpu_dest_addr, tmp_buffer.data(), size);
}