pub struct PipelinePassRef<'a, T>
where T: Access,
{ /* private fields */ }
Expand description

A render pass which has been bound to a particular compute, graphic, or ray-trace pipeline.

Implementations§

source§

impl<'a, T> PipelinePassRef<'a, T>
where T: Access,

source

pub fn access_descriptor<N>( self, descriptor: impl Into<Descriptor>, node: N, access: AccessType ) -> Self
where N: Information + View, ViewType: From<<N as View>::Information>, <N as View>::Information: From<<N as Information>::Info>, <N as View>::Subresource: From<<N as View>::Information>,

Informs the pass that the next recorded command buffer will read or write the given node at the specified shader descriptor using access.

This function must be called for node before it is read or written within a record function. For general purpose access, see PipelinePassRef::read_descriptor or PipelinePassRef::write_descriptor.

source

pub fn access_descriptor_as<N>( self, descriptor: impl Into<Descriptor>, node: N, access: AccessType, view_info: impl Into<N::Information> ) -> Self
where N: View, <N as View>::Information: Into<ViewType>, <N as View>::Subresource: From<<N as View>::Information>,

Informs the pass that the next recorded command buffer will read or write the given node at the specified shader descriptor using access. The node will be interpreted using view_info.

This function must be called for node before it is read or written within a record function. For general purpose access, see PipelinePassRef::read_descriptor_as or PipelinePassRef::write_descriptor_as.

source

pub fn access_descriptor_subrange<N>( self, descriptor: impl Into<Descriptor>, node: N, access: AccessType, view_info: impl Into<N::Information>, subresource: impl Into<N::Subresource> ) -> Self
where N: View, <N as View>::Information: Into<ViewType>,

Informs the pass that the next recorded command buffer will read or write the subresource of node at the specified shader descriptor using access. The node will be interpreted using view_info.

This function must be called for node before it is read or written within a record function. For general purpose access, see PipelinePassRef::read_descriptor_subrange or PipelinePassRef::write_descriptor_subrange.

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 PipelinePassRef::read_node or PipelinePassRef::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 PipelinePassRef::read_node_mut or PipelinePassRef::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 PipelinePassRef::read_node_subrange or PipelinePassRef::write_node_subrange.

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 PipelinePassRef::read_node_subrange_mut or PipelinePassRef::write_node_subrange_mut.

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 node_info<N>(&self, node: N) -> <N as Information>::Info
where N: Information,

Returns information used to crate a node.

source

pub fn read_descriptor<N>( self, descriptor: impl Into<Descriptor>, node: N ) -> Self
where N: Information + View, ViewType: From<<N as View>::Information>, <N as View>::Information: From<<N as Information>::Info>, <N as View>::Subresource: From<<N as View>::Information>,

Informs the pass that the next recorded command buffer will read the given node at the specified shader descriptor.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::access_descriptor.

source

pub fn read_descriptor_as<N>( self, descriptor: impl Into<Descriptor>, node: N, view_info: impl Into<N::Information> ) -> Self
where N: View, <N as View>::Information: Into<ViewType>, <N as View>::Subresource: From<<N as View>::Information>,

Informs the pass that the next recorded command buffer will read the given node at the specified shader descriptor. The node will be interpreted using view_info.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::access_descriptor_as.

source

pub fn read_descriptor_subrange<N>( self, descriptor: impl Into<Descriptor>, node: N, view_info: impl Into<N::Information>, subresource: impl Into<N::Subresource> ) -> Self
where N: View, <N as View>::Information: Into<ViewType>,

Informs the pass that the next recorded command buffer will read the subresource of node at the specified shader descriptor. The node will be interpreted using view_info.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::access_descriptor_subrange.

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.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::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.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::access_node_mut.

source

pub fn read_node_subrange<N>( self, node: N, subresource: impl Into<N::Subresource> ) -> Self
where N: View,

Informs the pass that the next recorded command buffer will read the subresource of node.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::access_node_subrange.

source

pub fn read_node_subrange_mut<N>( &mut self, node: N, subresource: impl Into<N::Subresource> )
where N: View,

Informs the pass that the next recorded command buffer will read the subresource of node.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is read within a record function. For more specific access, see PipelinePassRef::access_node_subrange_mut.

source

pub fn submit_pass(self) -> &'a mut RenderGraph

Finalizes a pass and returns the render graph so that additional passes may be added.

source

pub fn write_descriptor<N>( self, descriptor: impl Into<Descriptor>, node: N ) -> Self
where N: Information + View, <N as View>::Information: Into<ViewType> + From<<N as Information>::Info>, <N as View>::Subresource: From<<N as View>::Information>,

Informs the pass that the next recorded command buffer will write the given node at the specified shader descriptor.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::access_descriptor.

source

pub fn write_descriptor_as<N>( self, descriptor: impl Into<Descriptor>, node: N, view_info: impl Into<N::Information> ) -> Self
where N: View, <N as View>::Information: Into<ViewType>, <N as View>::Subresource: From<<N as View>::Information>,

Informs the pass that the next recorded command buffer will write the given node at the specified shader descriptor. The node will be interpreted using view_info.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::access_descriptor_as.

source

pub fn write_descriptor_subrange<N>( self, descriptor: impl Into<Descriptor>, node: N, view_info: impl Into<N::Information>, subresource: impl Into<N::Subresource> ) -> Self
where N: View, <N as View>::Information: Into<ViewType>,

Informs the pass that the next recorded command buffer will write the subresource of node at the specified shader descriptor. The node will be interpreted using view_info.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::access_descriptor_subrange.

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.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::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.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::access_node_mut.

source

pub fn write_node_subrange<N>( self, node: N, subresource: impl Into<N::Subresource> ) -> Self
where N: View,

Informs the pass that the next recorded command buffer will write the subresource of node.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::access_node_subrange.

source

pub fn write_node_subrange_mut<N>( &mut self, node: N, subresource: impl Into<N::Subresource> )
where N: View,

Informs the pass that the next recorded command buffer will write the subresource of node.

The AccessType is inferred by the currently bound pipeline. See Access for details.

This function must be called for node before it is written within a record function. For more specific access, see PipelinePassRef::access_node_subrange_mut.

source§

impl<'a> PipelinePassRef<'a, ComputePipeline>

source

pub fn record_compute( self, func: impl FnOnce(Compute<'_>, Bindings<'_>) + Send + 'static ) -> Self

Begin recording a computing command buffer.

source§

impl<'a> PipelinePassRef<'a, GraphicPipeline>

source

pub fn attach_color( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode> ) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_DONT_CARE for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call attach before resolve or store.

source

pub fn attach_color_as( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_DONT_CARE for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call attach before resolve or store.

source

pub fn attach_depth_stencil(self, image: impl Into<AnyImageNode>) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_DONT_CARE for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call attach before resolve or store.

source

pub fn attach_depth_stencil_as( self, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_DONT_CARE for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call attach before resolve or store.

source

pub fn clear_color( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode> ) -> Self

Clears the render pass attachment of any existing data.

NOTE: Order matters, call clear before resolve or store.

source

pub fn clear_color_value( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, color: impl Into<ClearColorValue> ) -> Self

Clears the render pass attachment of any existing data.

NOTE: Order matters, call clear before resolve or store.

source

pub fn clear_color_value_as( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, color: impl Into<ClearColorValue>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Clears the render pass attachment of any existing data.

NOTE: Order matters, call clear before resolve or store.

source

pub fn clear_depth_stencil(self, image: impl Into<AnyImageNode>) -> Self

Clears the render pass attachment of any existing data.

NOTE: Order matters, call clear before resolve or store.

source

pub fn clear_depth_stencil_value( self, image: impl Into<AnyImageNode>, depth: f32, stencil: u32 ) -> Self

Clears the render pass attachment of any existing data.

NOTE: Order matters, call clear before resolve or store.

source

pub fn clear_depth_stencil_value_as( self, image: impl Into<AnyImageNode>, depth: f32, stencil: u32, image_view_info: impl Into<ImageViewInfo> ) -> Self

Clears the render pass attachment of any existing data.

NOTE: Order matters, call clear before resolve or store.

source

pub fn load_color( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode> ) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_LOAD for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call load before resolve or store.

source

pub fn load_color_as( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_LOAD for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call load before resolve or store.

source

pub fn load_depth_stencil(self, image: impl Into<AnyImageNode>) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_LOAD for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call load before resolve or store.

source

pub fn load_depth_stencil_as( self, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Specifies VK_ATTACHMENT_LOAD_OP_LOAD for the render pass attachment, and loads an image into the framebuffer.

NOTE: Order matters, call load before resolve or store.

source

pub fn record_subpass( self, func: impl FnOnce(Draw<'_>, Bindings<'_>) + Send + 'static ) -> Self

Begin recording a graphics command buffer.

source

pub fn resolve_color( self, src_attachment_idx: AttachmentIndex, dst_attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode> ) -> Self

Resolves a multisample framebuffer to a non-multisample image for the render pass attachment.

NOTE: Order matters, call resolve after clear or load.

source

pub fn resolve_color_as( self, src_attachment_idx: AttachmentIndex, dst_attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Resolves a multisample framebuffer to a non-multisample image for the render pass attachment.

NOTE: Order matters, call resolve after clear or load.

source

pub fn resolve_depth_stencil( self, dst_attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, depth_mode: Option<ResolveMode>, stencil_mode: Option<ResolveMode> ) -> Self

Resolves a multisample framebuffer to a non-multisample image for the render pass attachment.

NOTE: Order matters, call resolve after clear or load.

source

pub fn resolve_depth_stencil_as( self, dst_attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, depth_mode: Option<ResolveMode>, stencil_mode: Option<ResolveMode> ) -> Self

Resolves a multisample framebuffer to a non-multisample image for the render pass attachment.

NOTE: Order matters, call resolve after clear or load.

source

pub fn set_depth_stencil(self, depth_stencil: DepthStencilMode) -> Self

Sets a particular depth/stencil mode.

source

pub fn set_multiview(self, view_mask: u32, correlated_view_mask: u32) -> Self

Sets multiview view and correlation masks.

See VkRenderPassMultiviewCreateInfo.

source

pub fn set_render_area(self, x: i32, y: i32, width: u32, height: u32) -> Self

Sets the renderArea field when beginning a render pass.

NOTE: Setting this value will cause the viewport and scissor to be unset, which is not the default behavior. When this value is set you should call set_viewport and set_scissor on the subpass.

If not set, this value defaults to the first loaded, resolved, or stored attachment dimensions and sets the viewport and scissor to the same values, with a 0..1 depth if not specified by set_depth_stencil.

source

pub fn store_color( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode> ) -> Self

Specifies VK_ATTACHMENT_STORE_OP_STORE for the render pass attachment, and stores the rendered pixels into an image.

NOTE: Order matters, call store after clear or load.

source

pub fn store_color_as( self, attachment_idx: AttachmentIndex, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Specifies VK_ATTACHMENT_STORE_OP_STORE for the render pass attachment, and stores the rendered pixels into an image.

NOTE: Order matters, call store after clear or load.

source

pub fn store_depth_stencil(self, image: impl Into<AnyImageNode>) -> Self

Specifies VK_ATTACHMENT_STORE_OP_STORE for the render pass attachment, and stores the rendered pixels into an image.

NOTE: Order matters, call store after clear or load.

source

pub fn store_depth_stencil_as( self, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo> ) -> Self

Specifies VK_ATTACHMENT_STORE_OP_STORE for the render pass attachment, and stores the rendered pixels into an image.

NOTE: Order matters, call store after clear or load.

source§

impl<'a> PipelinePassRef<'a, RayTracePipeline>

source

pub fn record_ray_trace( self, func: impl FnOnce(RayTrace<'_>, Bindings<'_>) + Send + 'static ) -> Self

Begin recording a ray tracing command buffer.

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, T> !RefUnwindSafe for PipelinePassRef<'a, T>

§

impl<'a, T> Send for PipelinePassRef<'a, T>
where T: Send,

§

impl<'a, T> !Sync for PipelinePassRef<'a, T>

§

impl<'a, T> Unpin for PipelinePassRef<'a, T>
where T: Unpin,

§

impl<'a, T> !UnwindSafe for PipelinePassRef<'a, T>

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