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 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
sourceimpl Clone for SubpassDependency
impl Clone for SubpassDependency
sourcefn clone(&self) -> SubpassDependency
fn clone(&self) -> SubpassDependency
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more