pub struct PipelineCommand<'c, T> { /* private fields */ }Expand description
A Command which has been bound to a particular compute, graphics, or ray tracing 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 compute pipeline work for this graph command.
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, )
Mutable-borrow form of Self::record_cmd.
Source§impl PipelineCommand<'_, GraphicsPipeline>
impl PipelineCommand<'_, GraphicsPipeline>
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(GraphicsCommandRef<'_>) + Send + 'static,
) -> Self
pub fn record_cmd( self, func: impl FnOnce(GraphicsCommandRef<'_>) + Send + 'static, ) -> Self
Begin recording graphics pipeline work for this graph command.
Sourcepub fn record_cmd_mut(
&mut self,
func: impl FnOnce(GraphicsCommandRef<'_>) + Send + 'static,
)
pub fn record_cmd_mut( &mut self, func: impl FnOnce(GraphicsCommandRef<'_>) + Send + 'static, )
Mutable-borrow form of Self::record_cmd.
Sourcepub fn render_area(self, area: Rect2D) -> Self
pub fn render_area(self, area: Rect2D) -> Self
Sets the render area used when beginning the render pass for 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
Mutable-borrow form of Self::color_attachment_image.
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
Mutable-borrow form of Self::color_attachment_image_view.
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
Mutable-borrow form of Self::color_attachment_resolve_image.
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
Mutable-borrow form of Self::color_attachment_resolve_image_view.
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
Mutable-borrow form of Self::depth_stencil.
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
Mutable-borrow form of Self::depth_stencil_attachment_image.
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
Mutable-borrow form of Self::depth_stencil_attachment_image_view.
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
Mutable-borrow form of Self::depth_stencil_attachment_resolve_image.
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
Mutable-borrow form of Self::depth_stencil_attachment_resolve_image_view.
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
Mutable-borrow form of Self::multiview.
Sourcepub fn set_render_area(&mut self, area: Rect2D) -> &mut Self
pub fn set_render_area(&mut self, area: Rect2D) -> &mut Self
Mutable-borrow form of Self::render_area.
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>,
Equivalent to Command::bind_pipeline for a command that already has a bound pipeline.
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,
Equivalent to Command::bind_resource for a command that already has a bound pipeline.
Sourcepub fn write_timestamp(&mut self) -> TimestampQuery
pub fn write_timestamp(&mut self) -> TimestampQuery
Equivalent to Command::write_timestamp for a command that already has a bound pipeline.
Sourcepub fn end_cmd(self) -> &'c mut Graph
pub fn end_cmd(self) -> &'c mut Graph
Equivalent to Command::end_cmd for a command that already has a bound pipeline.
Sourcepub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: Node,
pub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: Node,
Equivalent to Command::resource for a command that already has a bound pipeline.
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 recorded work will read or write resource_node using access.
An access function must be called for resource_node before it is used within a recording
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
Mutable-borrow form of Self::resource_access.
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
Mutable-borrow form of Self::shader_resource_access.
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
Mutable-borrow form of Self::shader_subresource_access.
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
Mutable-borrow form of Self::subresource_access.
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 recorded work will read or write the resource_node at the
specified shader binding using access.
If the same binding slot is used more than once, the last call wins and the previous
binding is silently overwritten.
An access function must be called for resource_node before it is used within a recording
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 recorded work will read or write the resource_node at the
specified shader binding using access. The resource will be interpreted using
view_info.
If the same binding slot is used more than once, the last call wins and the previous
binding is silently overwritten.
An access function must be called for resource_node before it is used within a recording
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 recorded work 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 recording
function.
Source§impl PipelineCommand<'_, RayTracingPipeline>
impl PipelineCommand<'_, RayTracingPipeline>
Sourcepub fn record_cmd(
self,
func: impl FnOnce(RayTracingCommandRef<'_>) + Send + 'static,
) -> Self
pub fn record_cmd( self, func: impl FnOnce(RayTracingCommandRef<'_>) + Send + 'static, ) -> Self
Begin recording ray tracing pipeline work for this graph command.
Sourcepub fn record_cmd_mut(
&mut self,
func: impl FnOnce(RayTracingCommandRef<'_>) + Send + 'static,
)
pub fn record_cmd_mut( &mut self, func: impl FnOnce(RayTracingCommandRef<'_>) + Send + 'static, )
Mutable-borrow form of Self::record_cmd.