diff options
author | Liam <byteslice@airmail.cc> | 2024-02-13 02:13:07 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-19 00:59:13 +0100 |
commit | 56810541f0be8951fef847368eb6db13af0d2174 (patch) | |
tree | c1a507b212bc7fb2c338d454f2953c99451ebeee /src/video_core/vulkan_common/vulkan_device.cpp | |
parent | Merge pull request #13068 from german77/no_errors (diff) | |
download | yuzu-56810541f0be8951fef847368eb6db13af0d2174.tar yuzu-56810541f0be8951fef847368eb6db13af0d2174.tar.gz yuzu-56810541f0be8951fef847368eb6db13af0d2174.tar.bz2 yuzu-56810541f0be8951fef847368eb6db13af0d2174.tar.lz yuzu-56810541f0be8951fef847368eb6db13af0d2174.tar.xz yuzu-56810541f0be8951fef847368eb6db13af0d2174.tar.zst yuzu-56810541f0be8951fef847368eb6db13af0d2174.zip |
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index d7216d349..b94924a58 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1297,10 +1297,6 @@ u64 Device::GetDeviceMemoryUsage() const { } void Device::CollectPhysicalMemoryInfo() { - // Account for resolution scaling in memory limits - const size_t normal_memory = 6_GiB; - const size_t scaler_memory = 1_GiB * Settings::values.resolution_info.ScaleUp(1); - // Calculate limits using memory budget VkPhysicalDeviceMemoryBudgetPropertiesEXT budget{}; budget.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; @@ -1331,7 +1327,15 @@ void Device::CollectPhysicalMemoryInfo() { if (!is_integrated) { const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB); device_access_memory -= reserve_memory; - device_access_memory = std::min<u64>(device_access_memory, normal_memory + scaler_memory); + + if (Settings::values.vram_usage_mode.GetValue() != Settings::VramUsageMode::Aggressive) { + // Account for resolution scaling in memory limits + const size_t normal_memory = 6_GiB; + const size_t scaler_memory = 1_GiB * Settings::values.resolution_info.ScaleUp(1); + device_access_memory = + std::min<u64>(device_access_memory, normal_memory + scaler_memory); + } + return; } const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); |