diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-11-09 17:58:10 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-01 22:43:57 +0100 |
commit | aad0cbf024fb8077a9b375a093c60a7e2ab1db3d (patch) | |
tree | 8c6a86c92ed8cedbafb5f34dd9f72283eaaf4342 /src/video_core/memory_manager.cpp | |
parent | MacroHLE: Add Index Buffer size estimation. (diff) | |
download | yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.tar yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.tar.gz yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.tar.bz2 yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.tar.lz yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.tar.xz yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.tar.zst yuzu-aad0cbf024fb8077a9b375a093c60a7e2ab1db3d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/memory_manager.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 8f6c51045..11e7d225e 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -577,7 +577,7 @@ size_t MemoryManager::MaxContinousRange(GPUVAddr gpu_addr, size_t size) const { return range_so_far; } -size_t MemoryManager::GetMemoryLayoutSize(GPUVAddr gpu_addr) const { +size_t MemoryManager::GetMemoryLayoutSize(GPUVAddr gpu_addr, size_t max_size) const { PTEKind base_kind = GetPageKind(gpu_addr); if (base_kind == PTEKind::INVALID) { return 0; @@ -596,6 +596,10 @@ size_t MemoryManager::GetMemoryLayoutSize(GPUVAddr gpu_addr) const { return true; } range_so_far += copy_amount; + if (range_so_far >= max_size) { + result = true; + return true; + } return false; }; auto big_check = [&](std::size_t page_index, std::size_t offset, std::size_t copy_amount) { @@ -605,6 +609,10 @@ size_t MemoryManager::GetMemoryLayoutSize(GPUVAddr gpu_addr) const { return true; } range_so_far += copy_amount; + if (range_so_far >= max_size) { + result = true; + return true; + } return false; }; auto check_short_pages = [&](std::size_t page_index, std::size_t offset, |