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>

source

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.

source

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.

source

pub fn access_node_subrange<N>( self, node: N, access: AccessType, subresource: impl Into<N::Subresource> ) -> Self
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.

source

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.

source

pub fn bind_node<'b, B>( &'b mut self, binding: B ) -> <B as Edge<RenderGraph>>::Result
where B: Edge<RenderGraph> + Bind<&'b mut RenderGraph, <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.

source

pub fn bind_pipeline<B>(self, binding: B) -> <B as Edge<Self>>::Result
where 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.

source

pub fn node_info<N>(&self, node: N) -> <N as Information>::Info
where N: Information,

Returns information used to crate a node.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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>

source§

fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, ComputePipeline>

Binds the resource to a graph-like object. Read more
source§

impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, GraphicPipeline>> for &'a Arc<GraphicPipeline>

source§

fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, GraphicPipeline>

Binds the resource to a graph-like object. Read more
source§

impl<'a> Bind<PassRef<'a>, PipelinePassRef<'a, RayTracePipeline>> for &'a Arc<RayTracePipeline>

source§

fn bind(self, pass: PassRef<'a>) -> PipelinePassRef<'_, RayTracePipeline>

Binds the resource to a graph-like object. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more