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 dependency_flags: DependencyFlags,
    pub view_offset: 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().

§dependency_flags: DependencyFlags

Dependency flags that modify behavior of the subpass dependency.

If a src_subpass equals dst_subpass, then:

  • If src_stages and dst_stages both contain framebuffer-space stages, this must include BY_REGION.
  • If the subpass’s view_mask has more than one view, this must include VIEW_LOCAL.

The default value is DependencyFlags::empty().

§view_offset: i32

If multiview rendering is being used (the subpasses have a nonzero view_mask), and dependency_flags includes VIEW_LOCAL, 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 dependency_flags does not include VIEW_LOCAL, or if src_subpass and dst_subpass are the same, the value must be 0.

The default value is 0.

§_ne: NonExhaustive

Trait Implementations§

source§

impl Clone for SubpassDependency

source§

fn clone(&self) -> SubpassDependency

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubpassDependency

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SubpassDependency

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for SubpassDependency

source§

fn eq(&self, other: &SubpassDependency) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for SubpassDependency

source§

impl StructuralEq for SubpassDependency

source§

impl StructuralPartialEq for SubpassDependency

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.