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
CreateSwapChain using Window size dimensions & VulkanDevice.cpp Cleanup
- Rewrote the Swapchain logic to use the size of the window and to use
these dimensions to clamp against the device capabilities.
- Also used the push method to add image views
- Did some housekeeping in the VulkanDevice.cpp source file to fix
warnings that we're being generated
ZENGINE_VALIDATE_ASSERT(vkCreateSwapchainKHR(LogicalDevice, &swapchain_create_info, nullptr, &SwapchainHandle) == VK_SUCCESS, "Failed to create Swapchain")
1098
1097
1099
-
uint32_t image_count = 0;
1100
-
ZENGINE_VALIDATE_ASSERT(vkGetSwapchainImagesKHR(LogicalDevice, SwapchainHandle, &image_count, nullptr) == VK_SUCCESS, "Failed to get Images count from Swapchain")
1101
-
1102
-
if (image_count < SwapchainImageCount)
1103
-
{
1104
-
ZENGINE_CORE_WARN("Max Swapchain image count supported is {}, but requested {}", image_count, SwapchainImageCount);
1105
-
SwapchainImageCount = image_count;
1106
-
ZENGINE_CORE_WARN("Swapchain image count has changed from {} to {}", SwapchainImageCount, image_count);
1107
-
}
1098
+
ZENGINE_VALIDATE_ASSERT(vkGetSwapchainImagesKHR(LogicalDevice, SwapchainHandle, &SwapchainImageCount, nullptr) == VK_SUCCESS, "Failed to get Images count from Swapchain")
ZENGINE_VALIDATE_ASSERT(vkGetSwapchainImagesKHR(LogicalDevice, SwapchainHandle, &SwapchainImageCount, SwapchainImages.data()) == VK_SUCCESS, "Failed to get VkImages from Swapchain")
1112
1105
1113
1106
/*Transition Image from Undefined to Present_src*/
0 commit comments