increase swapchain image count

This commit is contained in:
PancakeTAS 2025-07-02 10:51:43 +02:00
parent 260026beed
commit f62c2578da
No known key found for this signature in database

View file

@ -120,7 +120,11 @@ namespace {
const VkSwapchainCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSwapchainKHR* pSwapchain) {
auto res = vkCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain);
VkSwapchainCreateInfoKHR createInfo = *pCreateInfo;
createInfo.minImageCount += 2;
createInfo.imageUsage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
createInfo.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
auto res = vkCreateSwapchainKHR(device, &createInfo, pAllocator, pSwapchain);
// add the swapchain to the application
if (!application.has_value()) {