Trait tiny_wgpu::ComputeProgram

source ·
pub trait ComputeProgram<'a> {
Show 15 methods // Required methods fn storage(&self) -> &Storage<'a>; fn storage_mut(&mut self) -> &mut Storage<'a>; fn compute(&self) -> &Compute; // Provided methods fn add_buffer<'b: 'a>( &mut self, label: &'b str, usage: BufferUsages, size: u64 ) { ... } fn add_module<'b: 'a>( &mut self, label: &'b str, shader: ShaderModuleDescriptor<'_> ) { ... } fn add_staging_buffer<'b: 'a>(&mut self, label: &'b str) { ... } fn add_texture<'b: 'a>( &mut self, label: &'b str, usage: TextureUsages, format: TextureFormat, size: Extent3d ) { ... } fn add_sampler<'b: 'a>( &mut self, label: &'b str, descriptor: SamplerDescriptor<'_> ) { ... } fn add_bind_group<'b: 'a>( &mut self, label: &'b str, items: &[BindGroupItem<'_>] ) { ... } fn copy_buffer_to_buffer_full<'b: 'a>( &self, encoder: &mut CommandEncoder, buffer_a: &'b str, buffer_b: &'b str ) { ... } fn copy_buffer_to_staging<'b: 'a>( &self, encoder: &mut CommandEncoder, label: &'b str ) { ... } fn prepare_staging_buffer<'b: 'a>(&self, label: &'b str) { ... } fn read_staging_buffer<'b: 'a>(&self, label: &'b str, dst: &mut [u8]) { ... } fn add_compute_pipelines<'b: 'a>( &mut self, module: &'b str, bind_groups: &[&'b str], kernels: &[ComputeKernel<'b>], push_constant_ranges: &[PushConstantRange], compilation_options: Option<PipelineCompilationOptions<'_>> ) { ... } fn add_render_pipelines<'b: 'a>( &mut self, module: &'b str, bind_groups: &[&'b str], kernels: &[RenderKernel<'b>], 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<'a>

source

fn storage_mut(&mut self) -> &mut Storage<'a>

source

fn compute(&self) -> &Compute

Provided Methods§

source

fn add_buffer<'b: 'a>(&mut self, label: &'b str, usage: BufferUsages, size: u64)

source

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

source

fn add_staging_buffer<'b: 'a>(&mut self, label: &'b str)

source

fn add_texture<'b: 'a>( &mut self, label: &'b str, usage: TextureUsages, format: TextureFormat, size: Extent3d )

source

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

source

fn add_bind_group<'b: 'a>( &mut self, label: &'b str, items: &[BindGroupItem<'_>] )

source

fn copy_buffer_to_buffer_full<'b: 'a>( &self, encoder: &mut CommandEncoder, buffer_a: &'b str, buffer_b: &'b str )

source

fn copy_buffer_to_staging<'b: 'a>( &self, encoder: &mut CommandEncoder, label: &'b str )

source

fn prepare_staging_buffer<'b: 'a>(&self, label: &'b str)

source

fn read_staging_buffer<'b: 'a>(&self, label: &'b str, dst: &mut [u8])

source

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

source

fn add_render_pipelines<'b: 'a>( &mut self, module: &'b str, bind_groups: &[&'b str], kernels: &[RenderKernel<'b>], push_constant_ranges: &[PushConstantRange], targets: &[Option<ColorTargetState>], vertex_buffer_layouts: &[VertexBufferLayout<'_>], vertex_compilation_options: Option<PipelineCompilationOptions<'_>>, fragment_compilation_options: Option<PipelineCompilationOptions<'_>> )

Implementors§