pub enum Layout {
General,
ColorAttachmentOptimal,
DepthStencilAttachmentOptimal,
DepthStencilReadOnlyOptimal,
ShaderReadOnlyOptimal,
TransferSrcOptimal,
TransferDstOptimal,
Present,
}
Expand description
Image layout defines how texel are placed in memory. Operations can be used in one or more layouts. User is responsible to insert layout transition commands to ensure that the image is in valid layout for each operation. Pipeline barriers can be used to change layouts. Additionally render pass can change layout of its attachments.
Variants§
General
Can be used with all device operations. Only presentation is not possible in this layout. Operations may perform slower in this layout.
ColorAttachmentOptimal
Can be used for color attachments.
DepthStencilAttachmentOptimal
Can be used for depth-stencil attachments.
DepthStencilReadOnlyOptimal
Can be used for depth-stencil attachments without writes.
ShaderReadOnlyOptimal
Can be used for images accessed from shaders without writes.
TransferSrcOptimal
Can be used for copy, blit and other transferring operations on source image.
TransferDstOptimal
Can be used for copy, blit and other transferring operations on destination image.
Present
Layout for swapchain images presentation. Should not be used if presentation feature is not enabled.