pub struct ComputeDispatch { /* private fields */ }Expand description
Executes compute shader dispatches.
Implementations§
Source§impl ComputeDispatch
impl ComputeDispatch
Sourcepub fn set_auto_barrier(&mut self, enabled: bool)
pub fn set_auto_barrier(&mut self, enabled: bool)
Set whether barriers are automatically issued after dispatch.
Sourcepub fn set_default_barrier(&mut self, bits: u32)
pub fn set_default_barrier(&mut self, bits: u32)
Set the default barrier bits.
Sourcepub fn dispatch(
&self,
gl: &Context,
program: &ComputeProgram,
dim: DispatchDimension,
)
pub fn dispatch( &self, gl: &Context, program: &ComputeProgram, dim: DispatchDimension, )
Dispatch a compute shader with the given program and dimensions.
Sourcepub fn dispatch_1d(
&self,
gl: &Context,
program: &ComputeProgram,
total_elements: u32,
local_size_x: u32,
)
pub fn dispatch_1d( &self, gl: &Context, program: &ComputeProgram, total_elements: u32, local_size_x: u32, )
Dispatch 1D: convenience for dispatching over N elements.
Sourcepub fn dispatch_2d(
&self,
gl: &Context,
program: &ComputeProgram,
width: u32,
height: u32,
local_size: WorkgroupSize,
)
pub fn dispatch_2d( &self, gl: &Context, program: &ComputeProgram, width: u32, height: u32, local_size: WorkgroupSize, )
Dispatch 2D: convenience for dispatching over a width x height grid.
Sourcepub fn dispatch_3d(
&self,
gl: &Context,
program: &ComputeProgram,
w: u32,
h: u32,
d: u32,
local_size: WorkgroupSize,
)
pub fn dispatch_3d( &self, gl: &Context, program: &ComputeProgram, w: u32, h: u32, d: u32, local_size: WorkgroupSize, )
Dispatch 3D.
Sourcepub fn dispatch_indirect(
&self,
gl: &Context,
program: &ComputeProgram,
buffer: BufferHandle,
offset: usize,
)
pub fn dispatch_indirect( &self, gl: &Context, program: &ComputeProgram, buffer: BufferHandle, offset: usize, )
Indirect dispatch: read dispatch arguments from a buffer on the GPU.
Sourcepub fn dispatch_with_barrier(
&self,
gl: &Context,
program: &ComputeProgram,
dim: DispatchDimension,
barrier: BufferBarrierType,
)
pub fn dispatch_with_barrier( &self, gl: &Context, program: &ComputeProgram, dim: DispatchDimension, barrier: BufferBarrierType, )
Dispatch with an explicit barrier type (overrides auto).
Sourcepub fn dispatch_multi(
&self,
gl: &Context,
program: &ComputeProgram,
dims: &[DispatchDimension],
)
pub fn dispatch_multi( &self, gl: &Context, program: &ComputeProgram, dims: &[DispatchDimension], )
Dispatch multiple passes of the same program with different dimensions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ComputeDispatch
impl RefUnwindSafe for ComputeDispatch
impl Send for ComputeDispatch
impl Sync for ComputeDispatch
impl Unpin for ComputeDispatch
impl UnsafeUnpin for ComputeDispatch
impl UnwindSafe for ComputeDispatch
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.