mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-11-23 03:24:07 +00:00
Merge pull request #12953 from FernandoS27/zero-fps-mah-ass
SMMU: Ensure the backing address range matches the current
This commit is contained in:
commit
bc9711cb1e
1 changed files with 7 additions and 0 deletions
|
@ -532,6 +532,7 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size
|
||||||
cache_bytes = 0;
|
cache_bytes = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
size_t old_vpage = (base_vaddress >> Memory::YUZU_PAGEBITS) - 1;
|
||||||
for (; page != page_end; ++page) {
|
for (; page != page_end; ++page) {
|
||||||
CounterAtomicType& count = cached_pages->at(page >> subentries_shift).Count(page);
|
CounterAtomicType& count = cached_pages->at(page >> subentries_shift).Count(page);
|
||||||
auto [asid_2, vpage] = ExtractCPUBacking(page);
|
auto [asid_2, vpage] = ExtractCPUBacking(page);
|
||||||
|
@ -547,6 +548,12 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size
|
||||||
memory_device_inter = registered_processes[asid_2.id];
|
memory_device_inter = registered_processes[asid_2.id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vpage != old_vpage + 1) [[unlikely]] {
|
||||||
|
release_pending();
|
||||||
|
}
|
||||||
|
|
||||||
|
old_vpage = vpage;
|
||||||
|
|
||||||
// Adds or subtracts 1, as count is a unsigned 8-bit value
|
// Adds or subtracts 1, as count is a unsigned 8-bit value
|
||||||
count.fetch_add(static_cast<CounterType>(delta), std::memory_order_release);
|
count.fetch_add(static_cast<CounterType>(delta), std::memory_order_release);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue