pub struct RenderingInfo {
    pub render_area_offset: [u32; 2],
    pub render_area_extent: [u32; 2],
    pub layer_count: u32,
    pub view_mask: u32,
    pub color_attachments: Vec<Option<RenderingAttachmentInfo>>,
    pub depth_attachment: Option<RenderingAttachmentInfo>,
    pub stencil_attachment: Option<RenderingAttachmentInfo>,
    pub contents: SubpassContents,
    pub _ne: NonExhaustive,
}
Expand description

Parameters to begin rendering.

Fields§

§render_area_offset: [u32; 2]

The offset from the top left corner of the attachments that will be rendered to.

This value must be smaller than the smallest width and height of the attachment images.

The default value is [0, 0].

§render_area_extent: [u32; 2]

The size of the area that will be rendered to.

This value plus render_area_offset must be no larger than the smallest width and height of the attachment images. If one of the elements is set to 0, the extent will be calculated automatically from the extents of the attachment images to be the largest allowed. At least one attachment image must be specified in that case.

The default value is [0, 0].

§layer_count: u32

The number of layers of the attachments that will be rendered to.

This must be no larger than the smallest number of array layers of the attachment images. If set to 0, the number of layers will be calculated automatically from the layer ranges of the attachment images to be the largest allowed. At least one attachment image must be specified in that case.

If the render pass uses multiview (view_mask is not 0), then this value must be 0 or 1.

The default value is 0.

§view_mask: u32

If not 0, enables multiview rendering, and specifies the view indices that are rendered to. 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, the multiview feature must be enabled on the device.

The default value is 0.

§color_attachments: Vec<Option<RenderingAttachmentInfo>>

The color attachments to use for rendering.

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.

§depth_attachment: Option<RenderingAttachmentInfo>

The depth attachment to use for rendering.

If set to Some, the image view must have the same samples value as those in color_attachments.

The default value is None.

§stencil_attachment: Option<RenderingAttachmentInfo>

The stencil attachment to use for rendering.

If set to Some, the image view must have the same samples value as those in color_attachments.

The default value is None.

§contents: SubpassContents

What kinds of commands will be recorded in the render pass: either inline draw commands, or executions of secondary command buffers.

If recorded in a secondary command buffer, this must be SubpassContents::Inline.

The default value is SubpassContents::Inline.

§_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.