pub struct AttachmentInfo<'a> {
pub index: u32,
pub clear: bool,
pub format: Format,
pub component_mapping: ComponentMapping,
pub mip_level: u32,
pub base_array_layer: u32,
pub _ne: NonExhaustive<'a>,
}
Expand description
Parameters describing a rendering attachment.
Fields§
§index: u32
The input attachment index or location to use.
For input attachments, this corresponds to the input attachment index you read from the shader. For color attachments, this corresponds to the location you read or write from the shader. For depth/stencil attachments, this is ignored.
The default value is 0
.
clear: bool
If set to true
, the attachment is cleared before the task is executed. The clear value is
set by the task in Task::clear_values
.
The default value is false
.
format: Format
The format of the attachment.
If left as the default, the format of the image is used.
If this is set to a format that is different from the image, the image must be created with
the MUTABLE_FORMAT
flag.
On portability subset devices, if format
does not have the same number of components
and bits per component as the parent image’s format, the
image_view_format_reinterpretation
feature must be enabled on the device.
The default value is Format::UNDEFINED
.
component_mapping: ComponentMapping
How to map components of each pixel.
On portability subset devices, if component_mapping
is not the identity mapping, the
image_view_format_swizzle
feature must be enabled on the device.
The default value is ComponentMapping::identity()
.
mip_level: u32
The mip level to render to.
The default value is 0
.
base_array_layer: u32
The base array layer to render to.
The default value is 0
.
_ne: NonExhaustive<'a>
Trait Implementations§
Source§impl<'a> Clone for AttachmentInfo<'a>
impl<'a> Clone for AttachmentInfo<'a>
Source§fn clone(&self) -> AttachmentInfo<'a>
fn clone(&self) -> AttachmentInfo<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more