From 368820d6e9a647eab3684aaa312f9a67e65fd1b9 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 27 Jan 2021 00:37:35 +1000 Subject: [PATCH] Vulkan: Default to two swap chain images --- src/common/vulkan/swap_chain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/vulkan/swap_chain.cpp b/src/common/vulkan/swap_chain.cpp index 754597f53..c57215dae 100644 --- a/src/common/vulkan/swap_chain.cpp +++ b/src/common/vulkan/swap_chain.cpp @@ -343,7 +343,7 @@ bool SwapChain::CreateSwapChain() return false; // Select number of images in swap chain, we prefer one buffer in the background to work on - u32 image_count = surface_capabilities.minImageCount + 1u; + u32 image_count = std::max(surface_capabilities.minImageCount + 1u, 2u); // maxImageCount can be zero, in which case there isn't an upper limit on the number of buffers. if (surface_capabilities.maxImageCount > 0)