pub(crate) struct Dispatch {
module: Box<dyn DynShaderModule>,
dst_bind_group_layout: Box<dyn DynBindGroupLayout>,
src_bind_group_layout: Box<dyn DynBindGroupLayout>,
pipeline_layout: Box<dyn DynPipelineLayout>,
pipeline: Box<dyn DynComputePipeline>,
dst_buffer: Box<dyn DynBuffer>,
dst_bind_group: Box<dyn DynBindGroup>,
}
Expand description
This machinery requires the following limits:
- max_bind_groups: 2,
- max_dynamic_storage_buffers_per_pipeline_layout: 1,
- max_storage_buffers_per_shader_stage: 2,
- max_storage_buffer_binding_size: 3 * min_storage_buffer_offset_alignment,
- max_push_constant_size: 4,
- max_compute_invocations_per_workgroup 1
These are all indirectly satisfied by DownlevelFlags::INDIRECT_EXECUTION
, which is also
required for this module’s functionality to work.
Fields§
§module: Box<dyn DynShaderModule>
§dst_bind_group_layout: Box<dyn DynBindGroupLayout>
§src_bind_group_layout: Box<dyn DynBindGroupLayout>
§pipeline_layout: Box<dyn DynPipelineLayout>
§pipeline: Box<dyn DynComputePipeline>
§dst_buffer: Box<dyn DynBuffer>
§dst_bind_group: Box<dyn DynBindGroup>
Implementations§
Source§impl Dispatch
impl Dispatch
pub(super) fn new( device: &dyn DynDevice, limits: &Limits, ) -> Result<Self, CreateIndirectValidationPipelineError>
Sourcepub(super) fn create_src_bind_group(
&self,
device: &dyn DynDevice,
limits: &Limits,
buffer_size: u64,
buffer: &dyn DynBuffer,
) -> Result<Option<Box<dyn DynBindGroup>>, DeviceError>
pub(super) fn create_src_bind_group( &self, device: &dyn DynDevice, limits: &Limits, buffer_size: u64, buffer: &dyn DynBuffer, ) -> Result<Option<Box<dyn DynBindGroup>>, DeviceError>
Ok(None)
will only be returned if buffer_size
is 0
.
pub fn params<'a>( &'a self, limits: &Limits, offset: u64, buffer_size: u64, ) -> Params<'a>
pub(super) fn dispose(self, device: &dyn DynDevice)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dispatch
impl !RefUnwindSafe for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl !UnwindSafe for Dispatch
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