pub trait ComputeProgram {
Show 16 methods
// Required methods
fn storage(&self) -> &Storage;
fn storage_mut(&mut self) -> &mut Storage;
fn compute(&self) -> &Compute;
// Provided methods
fn add_buffer(
&mut self,
label: &'static str,
usage: BufferUsages,
size: u64,
) { ... }
fn add_module(
&mut self,
label: &'static str,
shader: ShaderModuleDescriptor<'_>,
) { ... }
fn add_staging_buffer(&mut self, label: &'static str) { ... }
fn add_texture(
&mut self,
label: &'static str,
usage: TextureUsages,
format: TextureFormat,
size: Extent3d,
) { ... }
fn add_sampler(
&mut self,
label: &'static str,
descriptor: SamplerDescriptor<'_>,
) { ... }
fn add_bind_group(&mut self, label: &'static str, items: &[BindGroupItem]) { ... }
fn copy_buffer_to_buffer_full(
&self,
encoder: &mut CommandEncoder,
buffer_a: &'static str,
buffer_b: &'static str,
) { ... }
fn copy_buffer_to_staging(
&self,
encoder: &mut CommandEncoder,
label: &'static str,
) { ... }
fn prepare_staging_buffer(&self, label: &'static str) { ... }
fn read_staging_buffer<T: Pod>(&self, label: &'static str, dst: &mut [T]) { ... }
fn add_compute_pipelines(
&mut self,
module: &'static str,
bind_groups: &[&'static str],
kernels: &[ComputeKernel],
push_constant_ranges: &[PushConstantRange],
compilation_options: Option<PipelineCompilationOptions<'_>>,
) { ... }
fn add_render_pipelines_2(&mut self) { ... }
fn add_render_pipelines(
&mut self,
module: &'static str,
bind_groups: &[&'static str],
kernels: &[RenderKernel],
push_constant_ranges: &[PushConstantRange],
targets: &[Option<ColorTargetState>],
vertex_buffer_layouts: &[VertexBufferLayout<'_>],
vertex_compilation_options: Option<PipelineCompilationOptions<'_>>,
fragment_compilation_options: Option<PipelineCompilationOptions<'_>>,
) { ... }
}Required Methods§
fn storage(&self) -> &Storage
fn storage_mut(&mut self) -> &mut Storage
fn compute(&self) -> &Compute
Provided Methods§
fn add_buffer(&mut self, label: &'static str, usage: BufferUsages, size: u64)
fn add_module( &mut self, label: &'static str, shader: ShaderModuleDescriptor<'_>, )
fn add_staging_buffer(&mut self, label: &'static str)
fn add_texture( &mut self, label: &'static str, usage: TextureUsages, format: TextureFormat, size: Extent3d, )
fn add_sampler( &mut self, label: &'static str, descriptor: SamplerDescriptor<'_>, )
fn add_bind_group(&mut self, label: &'static str, items: &[BindGroupItem])
fn copy_buffer_to_buffer_full( &self, encoder: &mut CommandEncoder, buffer_a: &'static str, buffer_b: &'static str, )
fn copy_buffer_to_staging( &self, encoder: &mut CommandEncoder, label: &'static str, )
fn prepare_staging_buffer(&self, label: &'static str)
fn read_staging_buffer<T: Pod>(&self, label: &'static str, dst: &mut [T])
fn add_compute_pipelines( &mut self, module: &'static str, bind_groups: &[&'static str], kernels: &[ComputeKernel], push_constant_ranges: &[PushConstantRange], compilation_options: Option<PipelineCompilationOptions<'_>>, )
fn add_render_pipelines_2(&mut self)
fn add_render_pipelines( &mut self, module: &'static str, bind_groups: &[&'static str], kernels: &[RenderKernel], push_constant_ranges: &[PushConstantRange], targets: &[Option<ColorTargetState>], vertex_buffer_layouts: &[VertexBufferLayout<'_>], vertex_compilation_options: Option<PipelineCompilationOptions<'_>>, fragment_compilation_options: Option<PipelineCompilationOptions<'_>>, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.