ComputeProgram

Trait ComputeProgram 

Source
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§

Source

fn storage(&self) -> &Storage

Source

fn storage_mut(&mut self) -> &mut Storage

Source

fn compute(&self) -> &Compute

Provided Methods§

Source

fn add_buffer(&mut self, label: &'static str, usage: BufferUsages, size: u64)

Source

fn add_module( &mut self, label: &'static str, shader: ShaderModuleDescriptor<'_>, )

Source

fn add_staging_buffer(&mut self, label: &'static str)

Source

fn add_texture( &mut self, label: &'static str, usage: TextureUsages, format: TextureFormat, size: Extent3d, )

Source

fn add_sampler( &mut self, label: &'static str, descriptor: SamplerDescriptor<'_>, )

Source

fn add_bind_group(&mut self, label: &'static str, items: &[BindGroupItem])

Source

fn copy_buffer_to_buffer_full( &self, encoder: &mut CommandEncoder, buffer_a: &'static str, buffer_b: &'static str, )

Source

fn copy_buffer_to_staging( &self, encoder: &mut CommandEncoder, label: &'static str, )

Source

fn prepare_staging_buffer(&self, label: &'static str)

Source

fn read_staging_buffer<T: Pod>(&self, label: &'static str, dst: &mut [T])

Source

fn add_compute_pipelines( &mut self, module: &'static str, bind_groups: &[&'static str], kernels: &[ComputeKernel], push_constant_ranges: &[PushConstantRange], compilation_options: Option<PipelineCompilationOptions<'_>>, )

Source

fn add_render_pipelines_2(&mut self)

Source

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.

Implementors§