pub struct SubpassDependency {
    pub src_subpass: Option<u32>,
    pub dst_subpass: Option<u32>,
    pub src_stages: PipelineStages,
    pub dst_stages: PipelineStages,
    pub src_access: AccessFlags,
    pub dst_access: AccessFlags,
    pub by_region: bool,
    pub view_local: Option<i32>,
    pub _ne: NonExhaustive,
}
Expand description

A dependency between two subpasses of a render pass.

The implementation is allowed to change the order of the subpasses within a render pass, unless you specify that there exists a dependency between two subpasses (ie. the result of one will be used as the input of another one). Subpass dependencies work similar to pipeline barriers, except that they operate on whole subpasses instead of individual images.

If src_subpass and dst_subpass are equal, then this specifies a subpass self-dependency. The src_stages must all be logically earlier in the pipeline than the dst_stages, and if they both contain a framebuffer-space stage, then by_region must be activated.

If src_subpass or dst_subpass are set to None, this specifies an external dependency. An external dependency specifies a dependency on commands that were submitted before the render pass instance began (for src_subpass), or on commands that will be submitted after the render pass instance ends (for dst_subpass). The values must not both be None.

Fields

src_subpass: Option<u32>

The index of the subpass that writes the data that dst_subpass is going to use.

None specifies an external dependency.

The default value is None.

dst_subpass: Option<u32>

The index of the subpass that reads the data that src_subpass wrote.

None specifies an external dependency.

The default value is None.

src_stages: PipelineStages

The pipeline stages that must be finished on src_subpass before the dst_stages of dst_subpass can start.

The default value is PipelineStages::empty().

dst_stages: PipelineStages

The pipeline stages of dst_subpass that must wait for the src_stages of src_subpass to be finished. Stages that are earlier than the stages specified here can start before the src_stages are finished.

The default value is PipelineStages::empty().

src_access: AccessFlags

The way src_subpass accesses the attachments on which we depend.

The default value is AccessFlags::empty().

dst_access: AccessFlags

The way dst_subpass accesses the attachments on which we depend.

The default value is AccessFlags::empty().

by_region: bool

If false, then the source operations must be fully finished for the destination operations to start. If true, then the implementation can start the destination operation for some given pixels as long as the source operation is finished for these given pixels.

In other words, if the previous subpass has some side effects on other parts of an attachment, then you should set it to false.

Passing false is always safer than passing true, but in practice you rarely need to pass false.

The default value is false.

view_local: Option<i32>

If multiview rendering is being used (the subpasses have a nonzero view_mask), then setting this to Some creates a view-local dependency, between views in src_subpass and views in dst_subpass.

The inner value specifies an offset relative to the view index of dst_subpass: each view d in dst_subpass depends on view d + view_offset in src_subpass. If the source view index does not exist, the dependency is ignored for that view.

If multiview rendering is not being used, the value must be None. If src_subpass and dst_subpass are the same, only Some(0) and None are allowed as values, and if that subpass also has multiple bits set in its view_mask, the value must be Some(0).

The default value is None.

_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
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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.