diff options
| author | 2023-05-22 16:48:55 +0200 | |
|---|---|---|
| committer | 2023-05-22 16:48:55 +0200 | |
| commit | f8e7b44d2816108ace9e262f5161a98079a4ca7b (patch) | |
| tree | 5b818f1aa0ce8992bb363d0630f2c05b46f092f9 | |
| parent | Merge pull request #10392 from danilaml/update-cubeb-again (diff) | |
| download | yuzu-f8e7b44d2816108ace9e262f5161a98079a4ca7b.tar.gz yuzu-f8e7b44d2816108ace9e262f5161a98079a4ca7b.tar.xz yuzu-f8e7b44d2816108ace9e262f5161a98079a4ca7b.zip | |
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 ?
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index f6e6f2736..c0b2b3e17 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -1034,7 +1034,7 @@ void Device::CollectPhysicalMemoryInfo() { | |||
| 1034 | } | 1034 | } |
| 1035 | const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); | 1035 | const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); |
| 1036 | device_access_memory = static_cast<u64>(std::max<s64>( | 1036 | device_access_memory = static_cast<u64>(std::max<s64>( |
| 1037 | std::min<s64>(available_memory - 8_GiB, 4_GiB), static_cast<s64>(local_memory))); | 1037 | std::min<s64>(available_memory - 8_GiB, 4_GiB), std::min<s64>(local_memory, 4_GiB))); |
| 1038 | } | 1038 | } |
| 1039 | 1039 | ||
| 1040 | void Device::CollectToolingInfo() { | 1040 | void Device::CollectToolingInfo() { |