Struct vulkano::render_pass::SubpassDescription
source · [−]pub struct SubpassDescription {
pub view_mask: u32,
pub input_attachments: Vec<Option<AttachmentReference>>,
pub color_attachments: Vec<Option<AttachmentReference>>,
pub resolve_attachments: Vec<Option<AttachmentReference>>,
pub depth_stencil_attachment: Option<AttachmentReference>,
pub preserve_attachments: Vec<u32>,
pub _ne: NonExhaustive,
}
Expand description
Describes one of the subpasses of a render pass.
A subpass can use zero or more attachments of various types. Attachment types of which there can
be multiple are listed in a Vec
in this structure. The index in these Vec
s corresponds to
the index used for that attachment type in the shader.
If a particular index is not used in the shader, it can be set to None
in this structure.
This is useful if an unused index needs to be skipped but a higher index needs to be specified.
If an attachment is used more than once, i.e. a given AttachmentReference::attachment
occurs
more than once in the SubpassDescription
, then their AttachmentReference::layout
must be
the same as well.
Fields
view_mask: u32
If not 0
, enables multiview rendering, and specifies the view indices that are rendered to
in this subpass. The value is a bitmask, so that that for example 0b11
will draw to the
first two views and 0b101
will draw to the first and third view.
If set to a nonzero value, it must be nonzero for all subpasses in the render pass, and the
multiview
feature must be enabled on the device.
The default value is 0
.
input_attachments: Vec<Option<AttachmentReference>>
The attachments of the render pass that are to be used as input attachments in this subpass.
If an attachment is used here for the first time in this render pass, and it’s is not also
used as a color or depth/stencil attachment in this subpass, then the attachment’s load_op
must not be LoadOp::Clear
.
The default value is empty.
color_attachments: Vec<Option<AttachmentReference>>
The attachments of the render pass that are to be used as color attachments in this subpass.
The number of color attachments must be less than the
max_color_attachments
limit of the
physical device. All color attachments must have the same samples
value.
The default value is empty.
resolve_attachments: Vec<Option<AttachmentReference>>
The attachments of the render pass that are to be used as resolve attachments in this subpass.
This list must either be empty or have the same length as color_attachments
. If it’s not
empty, then each resolve attachment is paired with the color attachment of the same index.
The resolve attachments must all have a samples
value of SampleCount::Sample1
, while
the color attachments must have a samples
value other than SampleCount::Sample1
.
Each resolve attachment must have the same format
as the corresponding color attachment.
The default value is empty.
depth_stencil_attachment: Option<AttachmentReference>
The single attachment of the render pass that is to be used as depth-stencil attachment in this subpass.
If set to Some
, the referenced attachment must have the same samples
value as those in
color_attachments
.
The default value is None
.
preserve_attachments: Vec<u32>
The indices of attachments of the render pass that will be preserved during this subpass.
The referenced attachments must not be used as any other attachment type in the subpass.
The default value is empty.
_ne: NonExhaustive
Trait Implementations
sourceimpl Clone for SubpassDescription
impl Clone for SubpassDescription
sourcefn clone(&self) -> SubpassDescription
fn clone(&self) -> SubpassDescription
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubpassDescription
impl Debug for SubpassDescription
Auto Trait Implementations
impl RefUnwindSafe for SubpassDescription
impl Send for SubpassDescription
impl Sync for SubpassDescription
impl Unpin for SubpassDescription
impl UnwindSafe for SubpassDescription
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more