mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-20 08:00:01 +00:00
Limit the device access memory to 4 GB
Hardly limiting the device access memory to 4 GB for integrated vulkan devices here. This works for the Steam Deck in order not to go above 4 GB VRAM usage any more (above this value the likelihood to crash when the RAM exceeds 12 GB as well raises). But there will be perhaps a detection mechanism necessary for detecting the real memory limit for integrated vulkan devices. Those likely might have small limits anyway, but what about integrated GPUs on machines with > 16 GB RAM, aka larger amounts ?
This commit is contained in:
parent
f82efe9f65
commit
f8e7b44d28
1 changed files with 1 additions and 1 deletions
|
@ -1034,7 +1034,7 @@ void Device::CollectPhysicalMemoryInfo() {
|
||||||
}
|
}
|
||||||
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);
|
||||||
device_access_memory = static_cast<u64>(std::max<s64>(
|
device_access_memory = static_cast<u64>(std::max<s64>(
|
||||||
std::min<s64>(available_memory - 8_GiB, 4_GiB), static_cast<s64>(local_memory)));
|
std::min<s64>(available_memory - 8_GiB, 4_GiB), std::min<s64>(local_memory, 4_GiB)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Device::CollectToolingInfo() {
|
void Device::CollectToolingInfo() {
|
||||||
|
|
Loading…
Reference in a new issue