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
.