VTLB: Fix unmapping all pages with 16K host

This commit is contained in:
Stenzek 2023-07-29 20:40:13 +10:00 committed by Connor McLaughlin
parent 122f1ec767
commit 22d929d171
1 changed files with 6 additions and 6 deletions

View File

@ -975,15 +975,15 @@ static void vtlb_RemoveFastmemMappings()
if (s_fastmem_virtual_mapping[page] == NO_FASTMEM_MAPPING) if (s_fastmem_virtual_mapping[page] == NO_FASTMEM_MAPPING)
continue; continue;
s_fastmem_virtual_mapping[page] = NO_FASTMEM_MAPPING; if (vtlb_IsHostCoalesced(page))
{
if (!vtlb_IsHostAligned(page << VTLB_PAGE_BITS))
continue;
if (!s_fastmem_area->Unmap(s_fastmem_area->PagePointer(vtlb_HostPage(page)), __pagesize)) if (!s_fastmem_area->Unmap(s_fastmem_area->PagePointer(vtlb_HostPage(page)), __pagesize))
Console.Error("Failed to unmap vaddr %08X", page * __pagesize); Console.Error("Failed to unmap vaddr %08X", page * __pagesize);
} }
s_fastmem_virtual_mapping[page] = NO_FASTMEM_MAPPING;
}
s_fastmem_physical_mapping.clear(); s_fastmem_physical_mapping.clear();
} }