Use recommended 3 backbuffers on MoltenVK on Mac

This commit is contained in:
Wojtek Figat
2022-01-09 20:12:52 +01:00
parent 959446df20
commit 2ca070ea3a
3 changed files with 5 additions and 1 deletions

View File

@@ -363,7 +363,7 @@ bool GPUSwapChainVulkan::CreateSwapChain(int32 width, int32 height)
VkSwapchainCreateInfoKHR swapChainInfo;
RenderToolsVulkan::ZeroStruct(swapChainInfo, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR);
swapChainInfo.surface = _surface;
swapChainInfo.minImageCount = Math::Clamp<uint32_t>(VULKAN_BACK_BUFFERS_COUNT, surfProperties.minImageCount, surfProperties.maxImageCount);
swapChainInfo.minImageCount = Math::Clamp<uint32_t>(VULKAN_BACK_BUFFERS_COUNT, surfProperties.minImageCount, Math::Min<uint32_t>(surfProperties.maxImageCount, VULKAN_BACK_BUFFERS_COUNT_MAX));
swapChainInfo.imageFormat = result.format;
swapChainInfo.imageColorSpace = result.colorSpace;
swapChainInfo.imageExtent.width = width;