pub struct PassRef<'a> { /* private fields */ }
Expand description
A general render pass which may contain acceleration structure commands, general commands, or have pipeline bound to then record commands specific to those pipeline types.
Implementations§
source§impl<'a> PassRef<'a>
impl<'a> PassRef<'a>
sourcepub fn access_node(
self,
node: impl Node + Information,
access: AccessType
) -> Self
pub fn access_node( self, node: impl Node + Information, access: AccessType ) -> Self
Informs the pass that the next recorded command buffer will read or write the given node
using access
.
This function must be called for node
before it is read or written within a record
function. For general purpose access, see PassRef::read_node
or PassRef::write_node
.
sourcepub fn access_node_mut(
&mut self,
node: impl Node + Information,
access: AccessType
)
pub fn access_node_mut( &mut self, node: impl Node + Information, access: AccessType )
Informs the pass that the next recorded command buffer will read or write the given node
using access
.
This function must be called for node
before it is read or written within a record
function. For general purpose access, see PassRef::read_node_mut
or
PassRef::write_node_mut
.
sourcepub fn access_node_subrange<N>(
self,
node: N,
access: AccessType,
subresource: impl Into<N::Subresource>
) -> Selfwhere
N: View,
pub fn access_node_subrange<N>(
self,
node: N,
access: AccessType,
subresource: impl Into<N::Subresource>
) -> Selfwhere
N: View,
Informs the pass that the next recorded command buffer will read or write the subresource
of node
using access
.
This function must be called for node
before it is read or written within a record
function. For general purpose access, see PassRef::read_node
or PassRef::write_node
.
sourcepub fn access_node_subrange_mut<N>(
&mut self,
node: N,
access: AccessType,
subresource: impl Into<N::Subresource>
)where
N: View,
pub fn access_node_subrange_mut<N>(
&mut self,
node: N,
access: AccessType,
subresource: impl Into<N::Subresource>
)where
N: View,
Informs the pass that the next recorded command buffer will read or write the subresource
of node
using access
.
This function must be called for node
before it is read or written within a record
function. For general purpose access, see PassRef::read_node
or PassRef::write_node
.
sourcepub fn bind_node<'b, B>(
&'b mut self,
binding: B
) -> <B as Edge<RenderGraph>>::Result
pub fn bind_node<'b, B>( &'b mut self, binding: B ) -> <B as Edge<RenderGraph>>::Result
Binds a Vulkan acceleration structure, buffer, or image to the graph associated with this pass.
Bound nodes may be used in passes for pipeline and shader operations.
sourcepub fn bind_pipeline<B>(self, binding: B) -> <B as Edge<Self>>::Resultwhere
B: Edge<Self> + Bind<Self, <B as Edge<Self>>::Result>,
pub fn bind_pipeline<B>(self, binding: B) -> <B as Edge<Self>>::Resultwhere
B: Edge<Self> + Bind<Self, <B as Edge<Self>>::Result>,
Binds a ComputePipeline
, GraphicPipeline
, or RayTracePipeline
to the current
pass, allowing for strongly typed access to the related functions.
sourcepub fn node_info<N>(&self, node: N) -> <N as Information>::Infowhere
N: Information,
pub fn node_info<N>(&self, node: N) -> <N as Information>::Infowhere
N: Information,
Returns information used to crate a node.
sourcepub fn read_node(self, node: impl Node + Information) -> Self
pub fn read_node(self, node: impl Node + Information) -> Self
Informs the pass that the next recorded command buffer will read the given node
using
AccessType::AnyShaderReadSampledImageOrUniformTexelBuffer
.
This function must be called for node
before it is read within a record
function. For
more specific access, see PassRef::access_node
.
sourcepub fn read_node_mut(&mut self, node: impl Node + Information)
pub fn read_node_mut(&mut self, node: impl Node + Information)
Informs the pass that the next recorded command buffer will read the given node
using
AccessType::AnyShaderReadSampledImageOrUniformTexelBuffer
.
This function must be called for node
before it is read within a record
function. For
more specific access, see PassRef::access_node
.
sourcepub fn record_acceleration(
self,
func: impl FnOnce(Acceleration<'_>, Bindings<'_>) + Send + 'static
) -> Self
pub fn record_acceleration( self, func: impl FnOnce(Acceleration<'_>, Bindings<'_>) + Send + 'static ) -> Self
Begin recording an acceleration structure command buffer.
This is the entry point for building and updating an AccelerationStructure
instance.
sourcepub fn record_cmd_buf(
self,
func: impl FnOnce(&Device, CommandBuffer, Bindings<'_>) + Send + 'static
) -> Self
pub fn record_cmd_buf( self, func: impl FnOnce(&Device, CommandBuffer, Bindings<'_>) + Send + 'static ) -> Self
Begin recording a general command buffer.
The provided closure allows you to run any Vulkan code, or interoperate with other Vulkan code and interfaces.
sourcepub fn submit_pass(self) -> &'a mut RenderGraph
pub fn submit_pass(self) -> &'a mut RenderGraph
Finalize the recording of this pass and return to the RenderGraph
where you may record
additional passes.
sourcepub fn write_node(self, node: impl Node + Information) -> Self
pub fn write_node(self, node: impl Node + Information) -> Self
Informs the pass that the next recorded command buffer will write the given node
using
AccessType::AnyShaderWrite
.
This function must be called for node
before it is written within a record
function. For
more specific access, see PassRef::access_node
.
sourcepub fn write_node_mut(&mut self, node: impl Node + Information)
pub fn write_node_mut(&mut self, node: impl Node + Information)
Informs the pass that the next recorded command buffer will write the given node
using
AccessType::AnyShaderWrite
.
This function must be called for node
before it is written within a record
function. For
more specific access, see PassRef::access_node
.
Trait Implementations§
source§impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, ComputePipeline>> for &'a Arc<ComputePipeline>
impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, ComputePipeline>> for &'a Arc<ComputePipeline>
source§fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, ComputePipeline>
fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, ComputePipeline>
source§impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, GraphicPipeline>> for &'a Arc<GraphicPipeline>
impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, GraphicPipeline>> for &'a Arc<GraphicPipeline>
source§fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, GraphicPipeline>
fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, GraphicPipeline>
source§impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, RayTracePipeline>> for &'a Arc<RayTracePipeline>
impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, RayTracePipeline>> for &'a Arc<RayTracePipeline>
source§fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, RayTracePipeline>
fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, RayTracePipeline>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PassRef<'a>
impl<'a> Send for PassRef<'a>
impl<'a> !Sync for PassRef<'a>
impl<'a> Unpin for PassRef<'a>
impl<'a> !UnwindSafe for PassRef<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.