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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.