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(); }