How to deal with the layouts of presentable images?
A presentable image starts out in VK_IMAGE_LAYOUT_UNDEFINED but will be VK_IMAGE_LAYOUT_PRESENT_SRC_KHR after they have been presented once. A lot of examples do a transition of all vkImages to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR immediately after creating the vkSwapchain . Which allows them to use an VK_IMAGE_LAYOUT_PRESENT_SRC_KHR for oldLayout . But doing the transition right after creation of the swapchain is not allowed. Use of a presentable image must occur only after the image is returned by vkAcquireNextImageKHR , and before it is presented by vkQueuePresentKHR . This includes