pub struct ComputeRecorder<'a> { /* private fields */ }Expand description
Records every dispatch of a physics frame into a single compute pass.
The runtime tracks buffer usage per dispatch and inserts the required barriers between dispatches inside the pass, so splitting a frame into dozens of one-dispatch passes buys nothing but submission overhead. A recorder owns the pass until dropped, at which point the encoder is released for copies and buffer operations.
Implementations§
Source§impl<'a> ComputeRecorder<'a>
impl<'a> ComputeRecorder<'a>
pub fn begin(encoder: &'a mut CommandEncoder, label: &str) -> Self
pub fn record( &mut self, pipeline: &ComputePipeline, bind_groups: &[&BindGroup], count: u32, )
pub fn record_indirect( &mut self, pipeline: &ComputePipeline, bind_groups: &[&BindGroup], args: &GpuBuffer, offset: u64, )
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ComputeRecorder<'a>
impl<'a> !UnwindSafe for ComputeRecorder<'a>
impl<'a> Freeze for ComputeRecorder<'a>
impl<'a> Send for ComputeRecorder<'a>
impl<'a> Sync for ComputeRecorder<'a>
impl<'a> Unpin for ComputeRecorder<'a>
impl<'a> UnsafeUnpin for ComputeRecorder<'a>
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