From 6e27b6f571f0aa8ec842e1ac97b021102791e61e Mon Sep 17 00:00:00 2001 From: Manuel Alfayate Corchete Date: Fri, 3 Mar 2023 00:49:02 +0100 Subject: [PATCH] [Vulkan] Don't clamp the number of requested images. (#15047) --- gfx/common/vulkan_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 46e8fd4b22..e4a59b3cd8 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -3189,9 +3189,10 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, * for GPU-rendered cores. */ desired_swapchain_images = settings->uints.video_max_swapchain_images; - /* Clamp images requested to what is supported by the implementation. */ - if (desired_swapchain_images < surface_properties.minImageCount) - desired_swapchain_images = surface_properties.minImageCount; + /* We don't clamp the number of images requested to what is reported + * as supported by the implementation in surface_properties.minImageCount, + * because MESA always reports a minImageCount of 4, but 3 and 2 work + * pefectly well, even if it's out of spec. */ if ((surface_properties.maxImageCount > 0) && (desired_swapchain_images > surface_properties.maxImageCount))