This question is a by-product of an answer to another question: https://stackoverflow.com/a/37948367/3256878.
When a swapchain is created, its images are in VK_IMAGE_LAYOUT_UNDEFINED
. In order to present they need to be in VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
. For this reason it seems plausible that all of them are available to the application via multiple invocations of vkAcquireNextImageKHR
immediately after creating the swapchain, that is, before any rendering takes place.
I'm assuming that since the images are in VK_IMAGE_LAYOUT_UNDEFINED
they should be available to the application because the presentation engine can't present them and so shouldn't be locked other than due to plain ownership. Is this assumption correct? I haven't found anything in the spec explicitly allowing or disallowing this.
I guess another way to ask the same is: can a swapchain image always be acquired by an application provided it's in VK_IMAGE_LAYOUT_UNDEFINED
?