Struct vulkano::render_pass::AttachmentReference
source · [−]pub struct AttachmentReference {
pub attachment: u32,
pub layout: ImageLayout,
pub aspects: ImageAspects,
pub _ne: NonExhaustive,
}
Expand description
A reference in a subpass description to a particular attachment of the render pass.
Fields
attachment: u32
The number of the attachment being referred to.
The default value is 0
.
layout: ImageLayout
The image layout that the attachment should be transitioned to at the start of the subpass.
The layout is restricted by the type of attachment that an attachment is being used as. A full listing of allowed layouts per type can be found in the Vulkan specification.
The default value is ImageLayout::Undefined
, which must be overridden.
aspects: ImageAspects
For references to input attachments, the aspects of the image that should be selected. For attachment types other than input attachments, the value must be empty.
If empty, all aspects available in the input attachment’s format
will be selected.
If any fields are set, they must be aspects that are available in the format
of the
attachment.
If the value is neither empty nor identical to the aspects of the format
, the device API
version must be at least 1.1, or either the
khr_create_renderpass2
or the
khr_maintenance2
extensions must be
enabled on the device.
The default value is ImageAspects::empty()
.
_ne: NonExhaustive
Trait Implementations
sourceimpl Clone for AttachmentReference
impl Clone for AttachmentReference
sourcefn clone(&self) -> AttachmentReference
fn clone(&self) -> AttachmentReference
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more