diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-22 18:31:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 18:31:17 +0100 |
commit | 984396a21ae8e82378b41f61f4f6a9745cde250a (patch) | |
tree | 10488a984d58f26cf791b1ad67d2a0223ba28163 /src/video_core | |
parent | Merge pull request #13075 from liamwhite/mali-having-a-bad-time (diff) | |
parent | vulkan_device: don't use fixed cap for memory limits (diff) | |
download | yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.tar yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.tar.gz yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.tar.bz2 yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.tar.lz yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.tar.xz yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.tar.zst yuzu-984396a21ae8e82378b41f61f4f6a9745cde250a.zip |
Diffstat (limited to 'src/video_core')
-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); |