Struct vello::Recording

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

source

pub fn push(&mut self, cmd: Command)

Appends a Command to the back of the Recording.

source

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.

source

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.

source

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.

source

pub fn write_image( &mut self, image: ImageProxy, x: u32, y: u32, width: u32, height: u32, data: impl Into<Vec<u8>> )

source

pub fn dispatch<R>( &mut self, shader: ShaderId, wg_size: (u32, u32, u32), resources: R )

source

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.

source

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.

source

pub fn clear_all(&mut self, buf: BufferProxy)

Commands to clear the whole buffer.

source

pub fn free_buffer(&mut self, buf: BufferProxy)

Commands to free the given buffer.

source

pub fn free_image(&mut self, image: ImageProxy)

Commands to free the given image.

source

pub fn free_resource(&mut self, resource: ResourceProxy)

Commands to free the given resource.

source

pub fn into_commands(self) -> Vec<Command>

Returns a Vec containing all the Commands in order.

Trait Implementations§

source§

impl Default for Recording

source§

fn default() -> Recording

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

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, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<T> WasmNotSend for T
where T: Send,

source§

impl<T> WasmNotSendSync for T

source§

impl<T> WasmNotSync for T
where T: Sync,