pub struct GpuCommandEncoder { /* private fields */ }Expand description
A recorded sequence of GPU commands (mock encoder).
Records commands for later submission; models wgpu-style recording.
Implementations§
Source§impl GpuCommandEncoder
impl GpuCommandEncoder
Sourcepub fn copy_buffer(&mut self, src: BufferId, dst: BufferId, size: usize)
pub fn copy_buffer(&mut self, src: BufferId, dst: BufferId, size: usize)
Record a buffer copy command.
Sourcepub fn dispatch_compute(&mut self, kernel_name: &str, workgroups: [u32; 3])
pub fn dispatch_compute(&mut self, kernel_name: &str, workgroups: [u32; 3])
Record a compute dispatch.
Sourcepub fn insert_barrier(&mut self, barrier: PipelineBarrier)
pub fn insert_barrier(&mut self, barrier: PipelineBarrier)
Insert a pipeline barrier.
Sourcepub fn push_constant(&mut self, name: &str, value: f64)
pub fn push_constant(&mut self, name: &str, value: f64)
Set a named push constant.
Sourcepub fn command_count(&self) -> usize
pub fn command_count(&self) -> usize
Number of recorded commands.
Sourcepub fn commands(&self) -> &[GpuCommand]
pub fn commands(&self) -> &[GpuCommand]
Return the recorded commands.
Auto Trait Implementations§
impl Freeze for GpuCommandEncoder
impl RefUnwindSafe for GpuCommandEncoder
impl Send for GpuCommandEncoder
impl Sync for GpuCommandEncoder
impl Unpin for GpuCommandEncoder
impl UnsafeUnpin for GpuCommandEncoder
impl UnwindSafe for GpuCommandEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more