From de50d9f69a741d8887a4c95cee3d8084862e4098 Mon Sep 17 00:00:00 2001 From: Lander Gallastegi Date: Mon, 16 Jun 2025 19:11:47 +0200 Subject: [PATCH] Bring back the gpu masking until properly handled --- src/video_core/buffer_cache/region_manager.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/video_core/buffer_cache/region_manager.h b/src/video_core/buffer_cache/region_manager.h index 5584f9afe..2c70d10b4 100644 --- a/src/video_core/buffer_cache/region_manager.h +++ b/src/video_core/buffer_cache/region_manager.h @@ -125,6 +125,11 @@ public: RegionBits& bits = GetRegionBits(); RegionBits mask(bits, start_page, end_page); + // TODO: this will not be needed once we handle readbacks + if constexpr (type == Type::GPU) { + mask &= ~writeable; + } + for (const auto& [start, end] : mask) { func(cpu_addr + start * BYTES_PER_PAGE, (end - start) * BYTES_PER_PAGE); } @@ -156,6 +161,12 @@ public: const RegionBits& bits = GetRegionBits(); RegionBits test(bits, start_page, end_page); + + // TODO: this will not be needed once we handle readbacks + if constexpr (type == Type::GPU) { + test &= ~writeable; + } + return test.Any(); }