diff --git a/rpcs3/Emu/RSX/VK/VKResourceManager.cpp b/rpcs3/Emu/RSX/VK/VKResourceManager.cpp index 1457f2b3b2..58c9198725 100644 --- a/rpcs3/Emu/RSX/VK/VKResourceManager.cpp +++ b/rpcs3/Emu/RSX/VK/VKResourceManager.cpp @@ -164,14 +164,18 @@ namespace vk const auto mem_info = get_current_renderer()->get_memory_mapping(); const auto local_memory_usage = vmm_get_application_memory_usage(mem_info.device_local); - constexpr u64 _1GB = (1024 * 0x100000); - if (local_memory_usage < (mem_info.device_local_total_bytes / 2) || // Less than 50% VRAM usage OR - (mem_info.device_local_total_bytes - local_memory_usage) > _1GB) // More than 1GiB of unallocated memory + constexpr u64 _1M = 0x100000; + const auto res_scale = rsx::get_resolution_scale(); + const auto mem_threshold_1 = static_cast(256 * res_scale * res_scale) * _1M; + const auto mem_threshold_2 = static_cast(64 * res_scale * res_scale) * _1M; + + if (local_memory_usage < (mem_info.device_local_total_bytes / 2) || // Less than 50% VRAM usage OR + (mem_info.device_local_total_bytes - local_memory_usage) > mem_threshold_1) // Enough to hold all required resources left { // Lower severity to avoid slowing performance too much load_severity = rsx::problem_severity::low; } - else if ((mem_info.device_local_total_bytes - local_memory_usage) > 512 * 0x100000) + else if ((mem_info.device_local_total_bytes - local_memory_usage) > mem_threshold_2) // Enough to hold basic resources like textures, buffers, etc { // At least 512MB left, do not overreact load_severity = rsx::problem_severity::moderate;