From 4e2f3a289c5c235af3774aebb1f69ba0e7ee5f6a Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 13 May 2023 02:28:17 +0300 Subject: [PATCH] vk: Tune resource quotas - Tuned for 1G. The system requires about 128M for scratch and system data. --- rpcs3/Emu/RSX/VK/VKRenderTargets.cpp | 2 +- rpcs3/Emu/RSX/VK/VKTextureCache.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKRenderTargets.cpp b/rpcs3/Emu/RSX/VK/VKRenderTargets.cpp index 78d12acc2..fd4b78133 100644 --- a/rpcs3/Emu/RSX/VK/VKRenderTargets.cpp +++ b/rpcs3/Emu/RSX/VK/VKRenderTargets.cpp @@ -30,7 +30,7 @@ namespace vk } else if (total_device_memory >= 1024) { - quota = 768; + quota = std::max(512, (total_device_memory * 30) / 100); } else if (total_device_memory >= 768) { diff --git a/rpcs3/Emu/RSX/VK/VKTextureCache.cpp b/rpcs3/Emu/RSX/VK/VKTextureCache.cpp index 7fe92c8e1..6595730b5 100644 --- a/rpcs3/Emu/RSX/VK/VKTextureCache.cpp +++ b/rpcs3/Emu/RSX/VK/VKTextureCache.cpp @@ -1396,13 +1396,17 @@ namespace vk const auto total_device_memory = m_device->get_memory_mapping().device_local_total_bytes / 0x100000; u64 quota = 0; - if (total_device_memory >= 1024) + if (total_device_memory >= 2048) { quota = std::min(3072, (total_device_memory * 40) / 100); } + else if (total_device_memory >= 1024) + { + quota = std::max(204, (total_device_memory * 30) / 100); + } else if (total_device_memory >= 768) { - quota = 256; + quota = 192; } else {