From 62ffbcde906439bf0fbf99fb9fd9239e8d1be014 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Tue, 25 Nov 2025 21:53:33 -0400 Subject: [PATCH] [vk, qcom] Adjusting Sampler Budget reserved value --- src/video_core/vulkan_common/vulkan_device.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index b696a39af6..c74fc742f3 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -586,13 +586,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR const size_t sampler_limit = properties.properties.limits.maxSamplerAllocationCount; if (sampler_limit > 0) { constexpr size_t MIN_SAMPLER_BUDGET = 1024U; + const size_t reserved = sampler_limit / 4U; const size_t derived_budget = - (std::max)(MIN_SAMPLER_BUDGET, sampler_limit / 4U); + (std::max)(MIN_SAMPLER_BUDGET, sampler_limit - reserved); sampler_heap_budget = derived_budget; LOG_WARNING(Render_Vulkan, - "Qualcomm driver reports max {} samplers; clamping cache to {} (25%) to " - "avoid heap exhaustion", - sampler_limit, sampler_heap_budget); + "Qualcomm driver reports max {} samplers; reserving {} (25%) and " + "allowing Eden to use {} (75%) to avoid heap exhaustion", + sampler_limit, reserved, sampler_heap_budget); } }