From 5740edfc4710e3b43f6d25b12780defce25fe436 Mon Sep 17 00:00:00 2001 From: Lander Gallastegi Date: Sun, 18 May 2025 13:52:27 +0200 Subject: [PATCH] Updated temporary workaround to use 4k pages --- src/video_core/buffer_cache/buffer_cache.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/video_core/buffer_cache/buffer_cache.cpp b/src/video_core/buffer_cache/buffer_cache.cpp index b2b54fc53..1cbed729f 100644 --- a/src/video_core/buffer_cache/buffer_cache.cpp +++ b/src/video_core/buffer_cache/buffer_cache.cpp @@ -137,11 +137,12 @@ void BufferCache::InvalidateMemory(VAddr device_addr, u64 size, bool unmap) { } { + // This is a temporary workaround... std::scoped_lock lock(dma_sync_ranges_mutex); - const VAddr aligned_addr = Common::AlignDown(device_addr, CACHING_PAGESIZE); + const VAddr aligned_addr = Common::AlignDown(device_addr, 4_KB); const u64 aligned_size = - Common::AlignUp(device_addr + size, CACHING_PAGESIZE) - aligned_addr; - dma_sync_ranges.Add(device_addr, size); + Common::AlignUp(device_addr + size, 4_KB) - aligned_addr; + dma_sync_ranges.Add(aligned_addr, aligned_size); } } }