You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Guard against device capabilities with maxImageCount == 0, which is
defined to mean that there is no limit to the number of images, the
only limitation is memory availability.
- Rearranged code to ensure consistency in the number of swapchains
created to match capability of device.
- We check the number of swapchains supported and allocate memory to
match this number.
ZENGINE_VALIDATE_ASSERT(vkGetSwapchainImagesKHR(LogicalDevice, SwapchainHandle, &image_count, nullptr) == VK_SUCCESS, "Failed to get Images count from Swapchain")
1101
1091
1102
-
if (image_count < SwapchainImageCount)
1092
+
if (image_count != SwapchainImageCount)
1103
1093
{
1104
1094
ZENGINE_CORE_WARN("Max Swapchain image count supported is {}, but requested {}", image_count, SwapchainImageCount);
1105
1095
SwapchainImageCount = image_count;
1106
1096
ZENGINE_CORE_WARN("Swapchain image count has changed from {} to {}", SwapchainImageCount, image_count);
ZENGINE_VALIDATE_ASSERT(vkGetSwapchainImagesKHR(LogicalDevice, SwapchainHandle, &SwapchainImageCount, SwapchainImages.data()) == VK_SUCCESS, "Failed to get VkImages from Swapchain")
0 commit comments