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>
impl PipelineCommand<'_, ComputePipeline>
Sourcepub fn record_cmd(
self,
func: impl FnOnce(ComputeCommandRef<'_>) + Send + 'static,
) -> Self
pub fn record_cmd( self, func: impl FnOnce(ComputeCommandRef<'_>) + Send + 'static, ) -> Self
Begin recording a compute pipeline command buffer.
Sourcepub fn record_cmd_mut(
&mut self,
func: impl FnOnce(ComputeCommandRef<'_>) + Send + 'static,
)
pub fn record_cmd_mut( &mut self, func: impl FnOnce(ComputeCommandRef<'_>) + Send + 'static, )
Begin recording a compute pipeline command buffer.
Source§impl PipelineCommand<'_, GraphicPipeline>
impl PipelineCommand<'_, GraphicPipeline>
Sourcepub fn color_attachment_image(
self,
color_attachment: u32,
image: impl Into<AnyImageNode>,
load: LoadOp<ClearColorValue>,
store: StoreOp,
) -> Self
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
Sourcepub 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
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
Sourcepub fn color_attachment_resolve_image(
self,
msaa_attachment: u32,
color_attachment: u32,
image: impl Into<AnyImageNode>,
) -> Self
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
Sourcepub fn color_attachment_resolve_image_view(
self,
msaa_attachment: u32,
color_attachment: u32,
image: impl Into<AnyImageNode>,
image_view_info: impl Into<ImageViewInfo>,
) -> Self
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
Sourcepub fn depth_stencil(self, depth_stencil: impl Into<DepthStencilInfo>) -> Self
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.
Sourcepub fn depth_stencil_attachment_image(
self,
image: impl Into<AnyImageNode>,
load: LoadOp<ClearDepthStencilValue>,
store: StoreOp,
) -> Self
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
Sourcepub fn depth_stencil_attachment_image_view(
self,
image: impl Into<AnyImageNode>,
image_view_info: impl Into<ImageViewInfo>,
load: LoadOp<ClearDepthStencilValue>,
store: StoreOp,
) -> Self
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
Sourcepub fn depth_stencil_attachment_resolve_image(
self,
depth_stencil_attachment: u32,
image: impl Into<AnyImageNode>,
depth_mode: Option<ResolveMode>,
stencil_mode: Option<ResolveMode>,
) -> Self
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
Sourcepub 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
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
Sourcepub fn multiview(self, view_mask: u32, correlated_view_mask: u32) -> Self
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.
Sourcepub fn record_cmd(
self,
func: impl FnOnce(GraphicCommandRef<'_>) + Send + 'static,
) -> Self
pub fn record_cmd( self, func: impl FnOnce(GraphicCommandRef<'_>) + Send + 'static, ) -> Self
Begin recording a graphics pipeline command buffer.
Sourcepub fn record_cmd_mut(
&mut self,
func: impl FnOnce(GraphicCommandRef<'_>) + Send + 'static,
)
pub fn record_cmd_mut( &mut self, func: impl FnOnce(GraphicCommandRef<'_>) + Send + 'static, )
Begin recording a graphics pipeline command buffer.
Sourcepub fn render_area(self, area: Rect2D) -> Self
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.
Sourcepub fn set_color_attachment_image(
&mut self,
color_attachment: u32,
image: impl Into<AnyImageNode>,
load: LoadOp<ClearColorValue>,
store: StoreOp,
) -> &mut Self
pub fn set_color_attachment_image( &mut self, color_attachment: u32, image: impl Into<AnyImageNode>, load: LoadOp<ClearColorValue>, store: StoreOp, ) -> &mut Self
Sourcepub 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
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
Sourcepub fn set_color_attachment_resolve_image(
&mut self,
msaa_attachment: u32,
color_attachment: u32,
image: impl Into<AnyImageNode>,
) -> &mut Self
pub fn set_color_attachment_resolve_image( &mut self, msaa_attachment: u32, color_attachment: u32, image: impl Into<AnyImageNode>, ) -> &mut Self
Sourcepub 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
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
Sourcepub fn set_depth_stencil(
&mut self,
depth_stencil: impl Into<DepthStencilInfo>,
) -> &mut Self
pub fn set_depth_stencil( &mut self, depth_stencil: impl Into<DepthStencilInfo>, ) -> &mut Self
Sourcepub fn set_depth_stencil_attachment_image(
&mut self,
image: impl Into<AnyImageNode>,
load: LoadOp<ClearDepthStencilValue>,
store: StoreOp,
) -> &mut Self
pub fn set_depth_stencil_attachment_image( &mut self, image: impl Into<AnyImageNode>, load: LoadOp<ClearDepthStencilValue>, store: StoreOp, ) -> &mut Self
Sourcepub 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
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
Sourcepub 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
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
Sourcepub 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
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
Sourcepub fn set_multiview(
&mut self,
view_mask: u32,
correlated_view_mask: u32,
) -> &mut Self
pub fn set_multiview( &mut self, view_mask: u32, correlated_view_mask: u32, ) -> &mut Self
See Self::multiview
Sourcepub fn set_render_area(&mut self, area: Rect2D) -> &mut Self
pub fn set_render_area(&mut self, area: Rect2D) -> &mut Self
Source§impl<'c, T> PipelineCommand<'c, T>
impl<'c, T> PipelineCommand<'c, T>
Sourcepub fn bind_pipeline<P>(self, pipeline: P) -> P::Commandwhere
P: Pipeline<'c>,
pub fn bind_pipeline<P>(self, pipeline: P) -> P::Commandwhere
P: Pipeline<'c>,
Binds a shader pipeline to the current command, allowing for strongly typed access to the related functions.
P | P::Command |
|---|---|
ComputePipeline | [`PipelineCommand<’_, |
| ComputePipeline>`] | |
GraphicPipeline | [`PipelineCommand<’_, |
| GraphicPipeline>`] | |
RayTracePipeline | [`PipelineCommand<’_, |
| RayTracePipeline>`] |
Sourcepub fn bind_resource<R>(&mut self, resource: R) -> R::Nodewhere
R: Resource,
pub fn bind_resource<R>(&mut self, resource: R) -> R::Nodewhere
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.
Sourcepub fn end_cmd(self) -> &'c mut Graph
pub fn end_cmd(self) -> &'c mut Graph
Finalizes a command and returns the graph so that additional commands may be added.
Sourcepub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: Node,
pub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: Node,
Returns a borrow of the original Vulkan resource (buffer, image or acceleration structure) which the given bound resource node represents.
Sourcepub fn resource_access<N>(self, resource_node: N, access: AccessType) -> Self
pub fn resource_access<N>(self, resource_node: N, access: AccessType) -> Self
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.
Sourcepub fn set_resource_access<N>(
&mut self,
resource_node: N,
access: AccessType,
) -> &mut Self
pub fn set_resource_access<N>( &mut self, resource_node: N, access: AccessType, ) -> &mut Self
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.
Sourcepub fn set_shader_resource_access<N>(
&mut self,
binding: impl Into<Binding>,
resource_node: N,
access: AccessType,
) -> &mut Self
pub fn set_shader_resource_access<N>( &mut self, binding: impl Into<Binding>, resource_node: N, access: AccessType, ) -> &mut Self
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.
Sourcepub fn set_shader_subresource_access<N>(
&mut self,
binding: impl Into<Binding>,
resource_node: N,
subresource: impl Into<N::Info>,
access: AccessType,
) -> &mut Self
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
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.
Sourcepub fn set_subresource_access<N>(
&mut self,
resource_node: N,
subresource: impl Into<N::Range>,
access: AccessType,
) -> &mut Self
pub fn set_subresource_access<N>( &mut self, resource_node: N, subresource: impl Into<N::Range>, access: AccessType, ) -> &mut Self
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.
Sourcepub fn shader_resource_access<N>(
self,
binding: impl Into<Binding>,
resource_node: N,
access: AccessType,
) -> Self
pub fn shader_resource_access<N>( self, binding: impl Into<Binding>, resource_node: N, access: AccessType, ) -> Self
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.
Sourcepub fn shader_subresource_access<N>(
self,
binding: impl Into<Binding>,
resource_node: N,
subresource: impl Into<N::Info>,
access: AccessType,
) -> Self
pub fn shader_subresource_access<N>( self, binding: impl Into<Binding>, resource_node: N, subresource: impl Into<N::Info>, access: AccessType, ) -> Self
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.
Sourcepub fn subresource_access<N>(
self,
resource_node: N,
subresource: impl Into<N::Range>,
access: AccessType,
) -> Self
pub fn subresource_access<N>( self, resource_node: N, subresource: impl Into<N::Range>, access: AccessType, ) -> Self
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>
impl PipelineCommand<'_, RayTracePipeline>
Sourcepub fn record_cmd(
self,
func: impl FnOnce(RayTraceCommandRef<'_>) + Send + 'static,
) -> Self
pub fn record_cmd( self, func: impl FnOnce(RayTraceCommandRef<'_>) + Send + 'static, ) -> Self
Begin recording a ray trace pipeline command buffer.
Sourcepub fn record_cmd_mut(
&mut self,
func: impl FnOnce(RayTraceCommandRef<'_>) + Send + 'static,
)
pub fn record_cmd_mut( &mut self, func: impl FnOnce(RayTraceCommandRef<'_>) + Send + 'static, )
Begin recording a ray trace pipeline command buffer.