From 82c7aa0e6f0f9d890da2ff77c861d157a7fb42a7 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Sat, 25 Jun 2016 09:52:46 +0200 Subject: [PATCH] Use max swapchain image setting when creating swapchain. --- gfx/common/vulkan_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 73d92726f2..154c793a6b 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -1841,6 +1841,7 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, VkSwapchainKHR old_swapchain; VkSurfaceTransformFlagBitsKHR pre_transform; VkPresentModeKHR swapchain_present_mode = VK_PRESENT_MODE_FIFO_KHR; + settings_t *settings = config_get_ptr(); present_mode_count = 0; VKFUNC(vkGetPhysicalDeviceSurfacePresentModesKHR)( @@ -1921,8 +1922,8 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, desired_swapchain_images = surface_properties.minImageCount + 1; /* Limit latency. */ - if (desired_swapchain_images > 3) - desired_swapchain_images = 3; + if (desired_swapchain_images > settings->video.max_swapchain_images) + desired_swapchain_images = settings->video.max_swapchain_images; if (desired_swapchain_images < surface_properties.minImageCount) desired_swapchain_images = surface_properties.minImageCount;