Bring back the gpu masking until properly handled

This commit is contained in:
Lander Gallastegi 2025-06-16 19:11:47 +02:00
parent ba5e0b0759
commit de50d9f69a

View File

@ -125,6 +125,11 @@ public:
RegionBits& bits = GetRegionBits<type>();
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<type>();
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();
}