mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-12 22:59:04 +00:00
Core: ClampRangeSize fixes (#3555)
* Swap !IsFree() for IsMapped() IsFree only checks if the VMAType == Free. As is, that means ClampRangeSize will include memory that is Reserved or PoolReserved, and neither of those types are GPU mapped. This fixes this bug, may help with some non-GPU memory asserts. * Apply ClampRangeSize to vertex buffers Helps with some cases encountered by UE and Minecraft.
This commit is contained in:
@@ -82,7 +82,7 @@ u64 MemoryManager::ClampRangeSize(VAddr virtual_addr, u64 size) {
|
||||
++vma;
|
||||
|
||||
// Keep adding to the size while there is contigious virtual address space.
|
||||
while (!vma->second.IsFree() && clamped_size < size) {
|
||||
while (vma->second.IsMapped() && clamped_size < size) {
|
||||
clamped_size += vma->second.size;
|
||||
++vma;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user