Browse Source
Merge pull request #10288 from liamwhite/vram-limits
vulkan_device: reserve extra memory to prevent swaps
pull/15/merge
liamwhite
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
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); |
|
|
|
|