diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-06-12 15:52:27 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-07-04 22:32:03 +0200 |
commit | 38165fb7e3e486b5099cfa76f5a09ec9f3201acd (patch) | |
tree | a80e66a254960c9c8c602f256cd37361c780d188 /src/video_core/memory_manager.cpp | |
parent | Merge pull request #6553 from FernandoS27/bite-a-bat-change-the-world (diff) | |
download | yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.tar yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.tar.gz yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.tar.bz2 yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.tar.lz yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.tar.xz yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.tar.zst yuzu-38165fb7e3e486b5099cfa76f5a09ec9f3201acd.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/memory_manager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 7124c755c..3589c72ea 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -127,8 +127,13 @@ void MemoryManager::SetPageEntry(GPUVAddr gpu_addr, PageEntry page_entry, std::s //// Lock the new page // TryLockPage(page_entry, size); + auto& current_page = page_table[PageEntryIndex(gpu_addr)]; + if (current_page.IsValid() != page_entry.IsValid() || + current_page.ToAddress() != page_entry.ToAddress()) { + rasterizer->ModifyGPUMemory(gpu_addr, size); + } - page_table[PageEntryIndex(gpu_addr)] = page_entry; + current_page = page_entry; } std::optional<GPUVAddr> MemoryManager::FindFreeRange(std::size_t size, std::size_t align, |