Struct vulkano::command_buffer::RenderingInfo
source · [−]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
sourceimpl Clone for RenderingInfo
impl Clone for RenderingInfo
sourcefn clone(&self) -> RenderingInfo
fn clone(&self) -> RenderingInfo
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more