Vulkan: Fix scenario where we limit the number of frames too much.

This commit is contained in:
Hans-Kristian Arntzen 2016-02-21 13:03:26 +01:00
parent 9e060bf088
commit 6e7f1371dd

View File

@ -1446,6 +1446,8 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
/* Limit latency. */
if (desired_swapchain_images > 3)
desired_swapchain_images = 3;
if (desired_swapchain_images < surface_properties.minImageCount)
desired_swapchain_images = surface_properties.minImageCount;
if ((surface_properties.maxImageCount > 0)
&& (desired_swapchain_images > surface_properties.maxImageCount))