pub struct GpuComputePass<'a> { /* private fields */ }Expand description
A compute pass — encodes dispatch commands for GPGPU workloads.
Implementations§
Source§impl<'a> GpuComputePass<'a>
impl<'a> GpuComputePass<'a>
Sourcepub fn set_pipeline(&mut self, pipeline: &'a GpuComputePipeline)
pub fn set_pipeline(&mut self, pipeline: &'a GpuComputePipeline)
Set the active compute pipeline.
Sourcepub fn set_bind_group(
&mut self,
index: u32,
bind_group: &'a GpuBindGroup,
offsets: &[u32],
)
pub fn set_bind_group( &mut self, index: u32, bind_group: &'a GpuBindGroup, offsets: &[u32], )
Set a bind group for the compute pipeline.
Sourcepub fn dispatch_workgroups(&mut self, x: u32, y: u32, z: u32)
pub fn dispatch_workgroups(&mut self, x: u32, y: u32, z: u32)
Dispatch compute work groups.
Sourcepub fn dispatch_workgroups_indirect(
&mut self,
buffer: &'a GpuBuffer,
offset: BufferAddress,
)
pub fn dispatch_workgroups_indirect( &mut self, buffer: &'a GpuBuffer, offset: BufferAddress, )
Dispatch compute work groups indirectly from a buffer.
Sourcepub fn set_push_constants(&mut self, offset: u32, data: &[u8])
pub fn set_push_constants(&mut self, offset: u32, data: &[u8])
Set push constants.
Sourcepub fn raw(&self) -> &ComputePass<'a>
pub fn raw(&self) -> &ComputePass<'a>
Access the underlying wgpu compute pass.
Sourcepub fn raw_mut(&mut self) -> &mut ComputePass<'a>
pub fn raw_mut(&mut self) -> &mut ComputePass<'a>
Access the underlying wgpu compute pass mutably.
Auto Trait Implementations§
impl<'a> Freeze for GpuComputePass<'a>
impl<'a> !RefUnwindSafe for GpuComputePass<'a>
impl<'a> Send for GpuComputePass<'a>
impl<'a> Sync for GpuComputePass<'a>
impl<'a> Unpin for GpuComputePass<'a>
impl<'a> UnsafeUnpin for GpuComputePass<'a>
impl<'a> !UnwindSafe for GpuComputePass<'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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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