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, graphics, or ray tracing pipeline.

Implementations§

Source§

impl PipelineCommand<'_, ComputePipeline>

Source

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

Begin recording compute pipeline work for this graph command.

Source

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

Mutable-borrow form of Self::record_cmd.

Source§

impl PipelineCommand<'_, GraphicsPipeline>

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(GraphicsCommandRef<'_>) + Send + 'static, ) -> Self

Begin recording graphics pipeline work for this graph command.

Source

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

Mutable-borrow form of Self::record_cmd.

Source

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.

See VkRenderPassBeginInfo.

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

Mutable-borrow form of Self::color_attachment_image.

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

Mutable-borrow form of Self::color_attachment_image_view.

Source

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.

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

Mutable-borrow form of Self::depth_stencil.

Source

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.

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

Mutable-borrow form of Self::multiview.

Source

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>

Source

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

Equivalent to Command::bind_pipeline for a command that already has a bound pipeline.

Source

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

Equivalent to Command::bind_resource for a command that already has a bound pipeline.

Source

pub fn write_timestamp(&mut self) -> TimestampQuery

Equivalent to Command::write_timestamp for a command that already has a bound pipeline.

Source

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

Equivalent to Command::end_cmd for a command that already has a bound pipeline.

Source

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

Equivalent to Command::resource for a command that already has a bound pipeline.

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

Source

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

Mutable-borrow form of Self::resource_access.

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

Mutable-borrow form of Self::shader_resource_access.

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

Mutable-borrow form of Self::shader_subresource_access.

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

Mutable-borrow form of Self::subresource_access.

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

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

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

Source

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

Begin recording ray tracing pipeline work for this graph command.

Source

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

Mutable-borrow form of Self::record_cmd.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<'c, T> UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.