mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
vulkan_device: reserve extra memory to prevent swaps
This commit is contained in:
parent
9c739f1506
commit
2be751100b
|
@ -1009,6 +1009,8 @@ void Device::CollectPhysicalMemoryInfo() {
|
||||||
device_access_memory += mem_properties.memoryHeaps[element].size;
|
device_access_memory += mem_properties.memoryHeaps[element].size;
|
||||||
}
|
}
|
||||||
if (!is_integrated) {
|
if (!is_integrated) {
|
||||||
|
const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB);
|
||||||
|
device_access_memory -= reserve_memory;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
|
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
|
||||||
|
|
Loading…
Reference in a new issue