pub struct Recording {
pub commands: Vec<Command>,
}
Expand description
List of Command
s for an engine to execute in order.
Fields§
§commands: Vec<Command>
Implementations§
source§impl Recording
impl Recording
sourcepub fn upload(
&mut self,
name: &'static str,
data: impl Into<Vec<u8>>
) -> BufferProxy
pub fn upload( &mut self, name: &'static str, data: impl Into<Vec<u8>> ) -> BufferProxy
Commands to upload the given data to a new buffer with the given name.
Returns a BufferProxy
to the buffer.
sourcepub fn upload_uniform(
&mut self,
name: &'static str,
data: impl Into<Vec<u8>>
) -> BufferProxy
pub fn upload_uniform( &mut self, name: &'static str, data: impl Into<Vec<u8>> ) -> BufferProxy
Commands to upload the given data to a new buffer as a uniform with the given name.
Returns a BufferProxy
to the buffer.
sourcepub fn upload_image(
&mut self,
width: u32,
height: u32,
format: ImageFormat,
data: impl Into<Vec<u8>>
) -> ImageProxy
pub fn upload_image( &mut self, width: u32, height: u32, format: ImageFormat, data: impl Into<Vec<u8>> ) -> ImageProxy
Commands to upload the given data to a new image with the given dimensions and format.
Returns an ImageProxy
to the buffer.
pub fn write_image( &mut self, image: ImageProxy, x: u32, y: u32, width: u32, height: u32, data: impl Into<Vec<u8>> )
pub fn dispatch<R>( &mut self, shader: ShaderId, wg_size: (u32, u32, u32), resources: R )
sourcepub fn dispatch_indirect<R>(
&mut self,
shader: ShaderId,
buf: BufferProxy,
offset: u64,
resources: R
)
pub fn dispatch_indirect<R>( &mut self, shader: ShaderId, buf: BufferProxy, offset: u64, resources: R )
Do an indirect dispatch.
Dispatch a compute shader where the size is determined dynamically.
The buf
argument contains the dispatch size, 3 u32
values beginning
at the given byte offset
.
sourcepub fn download(&mut self, buf: BufferProxy)
pub fn download(&mut self, buf: BufferProxy)
Prepare a buffer for downloading.
Currently this copies to a download buffer. The original buffer can be freed immediately after.
sourcepub fn clear_all(&mut self, buf: BufferProxy)
pub fn clear_all(&mut self, buf: BufferProxy)
Commands to clear the whole buffer.
sourcepub fn free_buffer(&mut self, buf: BufferProxy)
pub fn free_buffer(&mut self, buf: BufferProxy)
Commands to free the given buffer.
sourcepub fn free_image(&mut self, image: ImageProxy)
pub fn free_image(&mut self, image: ImageProxy)
Commands to free the given image.
sourcepub fn free_resource(&mut self, resource: ResourceProxy)
pub fn free_resource(&mut self, resource: ResourceProxy)
Commands to free the given resource.