Selecting Appropriate Image Layouts

The final image layout of an image used as an attachment to a frame buffer should be an appropriate optimal layout

During image creation, the initial image format does not affect performance in any way. The format VK_IMAGE_LAYOUT_UNDEFINED or the format VK_IMAGE_LAYOUT_PREINITIALIZED may be used without any impact on application performance.

If the application is using an image as a specific attachment type to a frame buffer such as colour, stencil, or depth, then the final image layout as defined in VkAttachmentDescription should be set to the appropriate optimal layout. This depends on the attachment usage, such as VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL for use as a colour attachment.