pub struct CommandStreamMut { /* private fields */ }Expand description
A mutable graph-like command stream being prepared.
CommandStreamMut is passed to CommandStream::finalize and CommandStream::prepare
callbacks. It provides graph-like methods plus CommandStreamMut::arg for typed stream
inputs.
let stream = CommandStream::finalize(|stream| {
let staging = stream.arg(BufferInfo::host_mem(
1024,
vk::BufferUsageFlags::TRANSFER_SRC,
));
stream.begin_cmd().resource_access(staging, vk_sync::AccessType::TransferRead);
staging
})
.into_stream();Implementations§
Source§impl CommandStreamMut
impl CommandStreamMut
Sourcepub fn arg<I>(&mut self, info: I) -> I::Argwhere
I: StreamArgInfo,
pub fn arg<I>(&mut self, info: I) -> I::Argwhere
I: StreamArgInfo,
Declares a typed argument required by this command stream.
Sourcepub fn begin_cmd(&mut self) -> StreamCommand<'_>
pub fn begin_cmd(&mut self) -> StreamCommand<'_>
Stream equivalent of Graph::begin_cmd.
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,
Stream equivalent of Graph::bind_resource.
Sourcepub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: StreamResourceNode,
pub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: StreamResourceNode,
Stream equivalent of Graph::resource.
Sourcepub fn blit_image(
&mut self,
src: impl Into<AnyImageNode>,
dst: impl Into<AnyImageNode>,
filter: Filter,
) -> &mut Self
pub fn blit_image( &mut self, src: impl Into<AnyImageNode>, dst: impl Into<AnyImageNode>, filter: Filter, ) -> &mut Self
Stream equivalent of Graph::blit_image.
Sourcepub fn clear_color_image(
&mut self,
image: impl Into<AnyImageNode>,
color: impl Into<ClearColorValue>,
) -> &mut Self
pub fn clear_color_image( &mut self, image: impl Into<AnyImageNode>, color: impl Into<ClearColorValue>, ) -> &mut Self
Stream equivalent of Graph::clear_color_image.
Sourcepub fn clear_depth_stencil_image(
&mut self,
image: impl Into<AnyImageNode>,
depth: f32,
stencil: u32,
) -> &mut Self
pub fn clear_depth_stencil_image( &mut self, image: impl Into<AnyImageNode>, depth: f32, stencil: u32, ) -> &mut Self
Stream equivalent of Graph::clear_depth_stencil_image.
Sourcepub fn copy_buffer(
&mut self,
src: impl Into<AnyBufferNode>,
dst: impl Into<AnyBufferNode>,
) -> &mut Self
pub fn copy_buffer( &mut self, src: impl Into<AnyBufferNode>, dst: impl Into<AnyBufferNode>, ) -> &mut Self
Stream equivalent of Graph::copy_buffer.
Sourcepub fn copy_buffer_to_image(
&mut self,
src: impl Into<AnyBufferNode>,
dst: impl Into<AnyImageNode>,
) -> &mut Self
pub fn copy_buffer_to_image( &mut self, src: impl Into<AnyBufferNode>, dst: impl Into<AnyImageNode>, ) -> &mut Self
Stream equivalent of Graph::copy_buffer_to_image.
Sourcepub fn copy_image(
&mut self,
src: impl Into<AnyImageNode>,
dst: impl Into<AnyImageNode>,
) -> &mut Self
pub fn copy_image( &mut self, src: impl Into<AnyImageNode>, dst: impl Into<AnyImageNode>, ) -> &mut Self
Stream equivalent of Graph::copy_image.
Sourcepub fn copy_image_to_buffer(
&mut self,
src: impl Into<AnyImageNode>,
dst: impl Into<AnyBufferNode>,
) -> &mut Self
pub fn copy_image_to_buffer( &mut self, src: impl Into<AnyImageNode>, dst: impl Into<AnyBufferNode>, ) -> &mut Self
Stream equivalent of Graph::copy_image_to_buffer.
Sourcepub fn fill_buffer(
&mut self,
buffer: impl Into<AnyBufferNode>,
region: Range<DeviceSize>,
data: u32,
) -> &mut Self
pub fn fill_buffer( &mut self, buffer: impl Into<AnyBufferNode>, region: Range<DeviceSize>, data: u32, ) -> &mut Self
Stream equivalent of Graph::fill_buffer.
Sourcepub fn update_buffer(
&mut self,
buffer: impl Into<AnyBufferNode>,
offset: DeviceSize,
data: impl AsRef<[u8]> + 'static + Send,
) -> &mut Self
pub fn update_buffer( &mut self, buffer: impl Into<AnyBufferNode>, offset: DeviceSize, data: impl AsRef<[u8]> + 'static + Send, ) -> &mut Self
Stream equivalent of Graph::update_buffer.