diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-05-14 17:02:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-14 17:02:15 -0400 |
| commit | 836b8e1d64f029ef69d212db3e30aa5e1e1b46d6 (patch) | |
| tree | 8067c1e84c42ee0fea79c10cca5ab3501c79ded9 /src/video_core/vulkan_common/vulkan_device.cpp | |
| parent | 35fe99f699b2ef7de8cf2922f25fa407e7a164e5 (diff) | |
| parent | 41353d738ad674bf351a03fe74a2f0a812fc63c3 (diff) | |
Merge pull request #10288 from liamwhite/vram-limits
vulkan_device: reserve extra memory to prevent swaps
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
| -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 6ffca2af21..161f050b8b 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); |
