pub struct Recording {
pub commands: Vec<Command>,
}Expand description
List of Commands 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, proxy: ImageProxy, x: u32, y: u32, image: ImageData, )
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 draw(&mut self, params: DrawParams)
Available on crate feature debug_layers only.
pub fn draw(&mut self, params: DrawParams)
debug_layers only.Issue a draw call
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.