vblanco20-1 / vulkan-guide

Introductory guide to vulkan.
https://vkguide.dev/
MIT License
909 stars 205 forks source link

fix vkb initialization and transitions #119

Open prathikkaranth opened 3 weeks ago

prathikkaranth commented 3 weeks ago

Fix for assertion error:

Assertion failed: features_13.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES

and validation error:

Validation Error: [ VUID-VkImageMemoryBarrier2-oldLayout-01197 ] Object 0: handle = 0x13572e86d80, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x2c8c6e7d | vkCmdPipelineBarrier2(): pDependencyInfo->pImageMemoryBarriers[0].image (VkImage 0xcfef35000000000a[]) cannot transition the layout of aspect=1, level=0, layer=0 from VK_IMAGE_LAYOUT_GENERAL when the previous known layout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. The Vulkan spec states: If srcQueueFamilyIndex and dstQueueFamilyIndex define a queue family ownership transfer or oldLayout and newLayout define an image layout transition, oldLayout must be VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources affected by the barrier