diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-05-14 23:02:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 23:02:15 +0200 |
commit | e9069dfe76b51259ee7d1f23622298d772240097 (patch) | |
tree | 8067c1e84c42ee0fea79c10cca5ab3501c79ded9 /src | |
parent | Merge pull request #10286 from liamwhite/compatible-bits (diff) | |
parent | vulkan_device: reserve extra memory to prevent swaps (diff) | |
download | yuzu-e9069dfe76b51259ee7d1f23622298d772240097.tar yuzu-e9069dfe76b51259ee7d1f23622298d772240097.tar.gz yuzu-e9069dfe76b51259ee7d1f23622298d772240097.tar.bz2 yuzu-e9069dfe76b51259ee7d1f23622298d772240097.tar.lz yuzu-e9069dfe76b51259ee7d1f23622298d772240097.tar.xz yuzu-e9069dfe76b51259ee7d1f23622298d772240097.tar.zst yuzu-e9069dfe76b51259ee7d1f23622298d772240097.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 6ffca2af2..161f050b8 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1009,6 +1009,8 @@ void Device::CollectPhysicalMemoryInfo() { device_access_memory += mem_properties.memoryHeaps[element].size; } if (!is_integrated) { + const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB); + device_access_memory -= reserve_memory; return; } const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); |