Struct vulkano::render_pass::SubpassDependency
source · [−]pub struct SubpassDependency {
pub source_subpass: Option<u32>,
pub destination_subpass: Option<u32>,
pub source_stages: PipelineStages,
pub destination_stages: PipelineStages,
pub source_access: AccessFlags,
pub destination_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 source_subpass
and destination_subpass
are equal, then this specifies a
subpass self-dependency.
The source_stages
must all be
logically earlier in the pipeline
than the destination_stages
, and if they both contain a
framebuffer-space stage,
then by_region
must be activated.
If source_subpass
or destination_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 source_subpass
), or on commands that will be submitted
after the render pass instance ends (for destination_subpass
). The values must not both be
None
.
Fields
source_subpass: Option<u32>
The index of the subpass that writes the data that destination_subpass
is going to use.
None
specifies an external dependency.
The default value is None
.
destination_subpass: Option<u32>
The index of the subpass that reads the data that source_subpass
wrote.
None
specifies an external dependency.
The default value is None
.
source_stages: PipelineStages
The pipeline stages that must be finished on source_subpass
before the
destination_stages
of destination_subpass
can start.
The default value is PipelineStages::none()
.
destination_stages: PipelineStages
The pipeline stages of destination_subpass
that must wait for the source_stages
of
source_subpass
to be finished. Stages that are earlier than the stages specified here can
start before the source_stages
are finished.
The default value is PipelineStages::none()
.
source_access: AccessFlags
The way source_subpass
accesses the attachments on which we depend.
The default value is AccessFlags::none()
.
destination_access: AccessFlags
The way destination_subpass
accesses the attachments on which we depend.
The default value is AccessFlags::none()
.
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 source_subpass
and views in destination_subpass
.
The inner value specifies an offset relative to the view index of destination_subpass
:
each view d
in destination_subpass
depends on view d + view_offset
in
source_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 source_subpass
and destination_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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubpassDependency
impl Debug for SubpassDependency
Auto Trait Implementations
impl RefUnwindSafe for SubpassDependency
impl Send for SubpassDependency
impl Sync for SubpassDependency
impl Unpin for SubpassDependency
impl UnwindSafe for SubpassDependency
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more