summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache/buffer_cache.h
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-29 01:35:51 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-07-03 00:09:48 +0200
commit6f7cb69c94bef0795f054d881e061745f69d1eda (patch)
treecc0bec2fed92a5645886dde773add00c84d8b9f4 /src/video_core/buffer_cache/buffer_cache.h
parentMerge pull request #10998 from Morph1984/qt-stop-messing-with-me (diff)
downloadyuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.gz
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.bz2
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.lz
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.xz
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.zst
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index b5ed3380f..6ed4b78f2 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -234,9 +234,10 @@ bool BufferCache<P>::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
if (has_new_downloads) {
memory_tracker.MarkRegionAsGpuModified(*cpu_dest_address, amount);
}
- tmp_buffer.resize_destructive(amount);
- cpu_memory.ReadBlockUnsafe(*cpu_src_address, tmp_buffer.data(), amount);
- cpu_memory.WriteBlockUnsafe(*cpu_dest_address, tmp_buffer.data(), amount);
+
+ Core::Memory::CpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadWrite> tmp(
+ cpu_memory, *cpu_src_address, amount, &tmp_buffer);
+ tmp.SetAddressAndSize(*cpu_dest_address, amount);
return true;
}