Struct vulkano::render_pass::SubpassDependency
source · 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
anddst_stages
both contain framebuffer-space stages, this must includeBY_REGION
. - If the subpass’s
view_mask
has more than one view, this must includeVIEW_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
impl Clone for SubpassDependency
source§fn clone(&self) -> SubpassDependency
fn clone(&self) -> SubpassDependency
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SubpassDependency
impl Debug for SubpassDependency
source§impl Default for SubpassDependency
impl Default for SubpassDependency
source§impl PartialEq for SubpassDependency
impl PartialEq for SubpassDependency
source§fn eq(&self, other: &SubpassDependency) -> bool
fn eq(&self, other: &SubpassDependency) -> bool
self
and other
values to be equal, and is used
by ==
.