Skip to main content

PipelineCommand

Struct PipelineCommand 

Source
pub struct PipelineCommand<'c, T> { /* private fields */ }
Expand description

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

Implementations§

Source§

impl PipelineCommand<'_, ComputePipeline>

Source

pub fn record_cmd( self, func: impl FnOnce(ComputeCommandRef<'_>) + Send + 'static, ) -> Self

Begin recording a compute pipeline command buffer.

Source

pub fn record_cmd_mut( &mut self, func: impl FnOnce(ComputeCommandRef<'_>) + Send + 'static, )

Begin recording a compute pipeline command buffer.

Source§

impl PipelineCommand<'_, GraphicPipeline>

Source

pub fn color_attachment_image( self, color_attachment: u32, image: impl Into<AnyImageNode>, load: LoadOp<ClearColorValue>, store: StoreOp, ) -> Self

Sets the color_attachment attachment index of the following render pass to the given image.

Note: To use multi-sampled (MSAA) rendering, use an image created with a sample count greater than one.

Note: The default view (the whole image) is used for image.

See Render Pass

Source

pub fn color_attachment_image_view( self, color_attachment: u32, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, load: LoadOp<ClearColorValue>, store: StoreOp, ) -> Self

Sets the color_attachment attachment index of the following render pass to the given image, as interpreted by image_view_info.

See Render Pass

Source

pub fn color_attachment_resolve_image( self, msaa_attachment: u32, color_attachment: u32, image: impl Into<AnyImageNode>, ) -> Self

Resolves a multi-sampled (MSAA) color image attachment into a single-sampled attachment using the given image.

Note: The default view (the whole image) is used for image.

See Render Pass

Source

pub fn color_attachment_resolve_image_view( self, msaa_attachment: u32, color_attachment: u32, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, ) -> Self

Resolves a multi-sampled (MSAA) color image attachment into a single-sampled attachment using the given image, as interpreted by image_view_info.

See Render Pass

Source

pub fn depth_stencil(self, depth_stencil: impl Into<DepthStencilInfo>) -> Self

Sets the combined depth and stencil state used by any subsequent command buffer recordings of the current graph command.

Source

pub fn depth_stencil_attachment_image( self, image: impl Into<AnyImageNode>, load: LoadOp<ClearDepthStencilValue>, store: StoreOp, ) -> Self

Sets the combined depth and stencil attachment of the following render pass to the given image.

Note: To use multi-sampled (MSAA) rendering, use an image created with a sample count greater than one.

Note: The default view (the whole image) is used for image.

See Render Pass

Source

pub fn depth_stencil_attachment_image_view( self, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, load: LoadOp<ClearDepthStencilValue>, store: StoreOp, ) -> Self

Sets the combined depth and stencil attachment of the following render pass to the given image, as interpreted by image_view_info.

Note: To use multi-sampled (MSAA) rendering, use an image created with a sample count greater than one.

Note: The default view (the whole image) is used for image.

See Render Pass

Source

pub fn depth_stencil_attachment_resolve_image( self, depth_stencil_attachment: u32, image: impl Into<AnyImageNode>, depth_mode: Option<ResolveMode>, stencil_mode: Option<ResolveMode>, ) -> Self

Resolves a multi-sampled (MSAA) combined depth and stencil image attachment into a single-sampled attachment using the given image.

Note: The default view (the whole image) is used for image.

See Render Pass

Source

pub fn depth_stencil_attachment_resolve_image_view( self, depth_stencil_attachment: u32, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, depth_mode: Option<ResolveMode>, stencil_mode: Option<ResolveMode>, ) -> Self

Resolves a multi-sampled (MSAA) combined depth and stencil image attachment into a single-sampled attachment using the given image, as interpreted by image_view_info.

Note: The default view (the whole image) is used for image.

See Render Pass

Source

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

Sets multiview view and correlation masks used by any subsequent command buffer recordings of the current graph command.

See VkRenderPassMultiviewCreateInfo.

Source

pub fn record_cmd( self, func: impl FnOnce(GraphicCommandRef<'_>) + Send + 'static, ) -> Self

Begin recording a graphics pipeline command buffer.

Source

pub fn record_cmd_mut( &mut self, func: impl FnOnce(GraphicCommandRef<'_>) + Send + 'static, )

Begin recording a graphics pipeline command buffer.

Source

pub fn render_area(self, area: Rect2D) -> Self

See VkRenderPassBeginInfo. field when beginning a render pass used by any subsequent command buffer recordings of the current graph command.

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 command buffer.

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 depth_stencil.

Source

pub fn set_color_attachment_image( &mut self, color_attachment: u32, image: impl Into<AnyImageNode>, load: LoadOp<ClearColorValue>, store: StoreOp, ) -> &mut Self

Source

pub fn set_color_attachment_image_view( &mut self, color_attachment: u32, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, load: LoadOp<ClearColorValue>, store: StoreOp, ) -> &mut Self

Source

pub fn set_color_attachment_resolve_image( &mut self, msaa_attachment: u32, color_attachment: u32, image: impl Into<AnyImageNode>, ) -> &mut Self

Source

pub fn set_color_attachment_resolve_image_view( &mut self, msaa_attachment: u32, color_attachment: u32, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, ) -> &mut Self

Source

pub fn set_depth_stencil( &mut self, depth_stencil: impl Into<DepthStencilInfo>, ) -> &mut Self

Source

pub fn set_depth_stencil_attachment_image( &mut self, image: impl Into<AnyImageNode>, load: LoadOp<ClearDepthStencilValue>, store: StoreOp, ) -> &mut Self

Source

pub fn set_depth_stencil_attachment_image_view( &mut self, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, load: LoadOp<ClearDepthStencilValue>, store: StoreOp, ) -> &mut Self

Source

pub fn set_depth_stencil_attachment_resolve_image( &mut self, depth_stencil_attachment: u32, image: impl Into<AnyImageNode>, depth_mode: Option<ResolveMode>, stencil_mode: Option<ResolveMode>, ) -> &mut Self

Source

pub fn set_depth_stencil_attachment_resolve_image_view( &mut self, depth_stencil_attachment: u32, image: impl Into<AnyImageNode>, image_view_info: impl Into<ImageViewInfo>, depth_mode: Option<ResolveMode>, stencil_mode: Option<ResolveMode>, ) -> &mut Self

Source

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

Source

pub fn set_render_area(&mut self, area: Rect2D) -> &mut Self

Source§

impl<'c, T> PipelineCommand<'c, T>

Source

pub fn bind_pipeline<P>(self, pipeline: P) -> P::Command
where P: Pipeline<'c>,

Binds a shader pipeline to the current command, allowing for strongly typed access to the related functions.

PP::Command
ComputePipeline[`PipelineCommand<’_,
ComputePipeline>`]
GraphicPipeline[`PipelineCommand<’_,
GraphicPipeline>`]
RayTracePipeline[`PipelineCommand<’_,
RayTracePipeline>`]
Source

pub fn bind_resource<R>(&mut self, resource: R) -> R::Node
where R: Resource,

Binds a Vulkan buffer, image, or acceleration structure resource to the graph associated with this command.

Bound nodes may be used in passes for pipeline and shader operations.

Source

pub fn end_cmd(self) -> &'c mut Graph

Finalizes a command and returns the graph so that additional commands may be added.

Source

pub fn resource<N>(&self, resource_node: N) -> &N::Resource
where N: Node,

Returns a borrow of the original Vulkan resource (buffer, image or acceleration structure) which the given bound resource node represents.

Source

pub fn resource_access<N>(self, resource_node: N, access: AccessType) -> Self
where N: Node + Subresource, SubresourceRange: From<N::Range>,

Informs the command that the next recorded command buffer will read or write resource_node using access.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn set_resource_access<N>( &mut self, resource_node: N, access: AccessType, ) -> &mut Self
where N: Node + Subresource, SubresourceRange: From<N::Range>,

Informs the command that the next recorded command buffer will read or write resource_node using access.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn set_shader_resource_access<N>( &mut self, binding: impl Into<Binding>, resource_node: N, access: AccessType, ) -> &mut Self
where N: Node + Subresource, N::Info: Copy, SubresourceRange: From<N::Info>, ViewInfo: From<N::Info>,

Informs the command that the next recorded command buffer will read or write the resource_node at the specified shader binding using access.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn set_shader_subresource_access<N>( &mut self, binding: impl Into<Binding>, resource_node: N, subresource: impl Into<N::Info>, access: AccessType, ) -> &mut Self
where N: Node + Subresource, N::Info: Copy, SubresourceRange: From<N::Info>, ViewInfo: From<N::Info>,

Informs the command that the next recorded command buffer will read or write the resource_node at the specified shader binding using access. The resource will be interpreted using view_info.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn set_subresource_access<N>( &mut self, resource_node: N, subresource: impl Into<N::Range>, access: AccessType, ) -> &mut Self
where N: Node + Subresource, SubresourceRange: From<N::Range>,

Informs the command that the next recorded command buffer will read or write the subresource of resource_node using access.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn shader_resource_access<N>( self, binding: impl Into<Binding>, resource_node: N, access: AccessType, ) -> Self
where N: Node + Subresource, N::Info: Copy, SubresourceRange: From<N::Info>, ViewInfo: From<N::Info>,

Informs the command that the next recorded command buffer will read or write the resource_node at the specified shader binding using access.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn shader_subresource_access<N>( self, binding: impl Into<Binding>, resource_node: N, subresource: impl Into<N::Info>, access: AccessType, ) -> Self
where N: Node + Subresource, N::Info: Copy, SubresourceRange: From<N::Info>, ViewInfo: From<N::Info>,

Informs the command that the next recorded command buffer will read or write the resource_node at the specified shader binding using access. The resource will be interpreted using view_info.

An access function must be called for resource_node before it is used within a record_-function.

Source

pub fn subresource_access<N>( self, resource_node: N, subresource: impl Into<N::Range>, access: AccessType, ) -> Self
where N: Node + Subresource, SubresourceRange: From<N::Range>,

Informs the command that the next recorded command buffer will read or write the subresource of resource_node using access.

An access function must be called for resource_node before it is used within a record_-function.

Source§

impl PipelineCommand<'_, RayTracePipeline>

Source

pub fn record_cmd( self, func: impl FnOnce(RayTraceCommandRef<'_>) + Send + 'static, ) -> Self

Begin recording a ray trace pipeline command buffer.

Source

pub fn record_cmd_mut( &mut self, func: impl FnOnce(RayTraceCommandRef<'_>) + Send + 'static, )

Begin recording a ray trace pipeline command buffer.

Auto Trait Implementations§

§

impl<'c, T> Freeze for PipelineCommand<'c, T>

§

impl<'c, T> !RefUnwindSafe for PipelineCommand<'c, T>

§

impl<'c, T> Send for PipelineCommand<'c, T>
where T: Send,

§

impl<'c, T> !Sync for PipelineCommand<'c, T>

§

impl<'c, T> Unpin for PipelineCommand<'c, T>
where T: Unpin,

§

impl<'c, T> UnsafeUnpin for PipelineCommand<'c, T>

§

impl<'c, T> !UnwindSafe for PipelineCommand<'c, 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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

Source§

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

Source§

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.