pub struct ComputePipelineDescriptorBuilder<'a, CS: State<'a>> { /* private fields */ }Expand description
Builder for wgpu::ComputePipelineDescriptor
Set all required fields and any optional fields, then call build().
Builder field setters:
- layout Optional, defaults to
None - module Required
- entry_point Optional, defaults to
None - compilation_options Optional, defaults to wgpu::PipelineCompilationOptions::default()
- cache Optional, defaults to
None
Implementations§
Source§impl<'a> ComputePipelineDescriptorBuilder<'a, Empty>
impl<'a> ComputePipelineDescriptorBuilder<'a, Empty>
pub fn new() -> ComputePipelineDescriptorBuilder<'a, Empty>
Source§impl<'a, CS: State<'a>> ComputePipelineDescriptorBuilder<'a, CS>
impl<'a, CS: State<'a>> ComputePipelineDescriptorBuilder<'a, CS>
Sourcepub fn label(
self,
label: Label<'a>,
) -> ComputePipelineDescriptorBuilder<'a, SetLabel<CS>>where
CS::Label: LabelIsEmpty,
pub fn label(
self,
label: Label<'a>,
) -> ComputePipelineDescriptorBuilder<'a, SetLabel<CS>>where
CS::Label: LabelIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::label. Optional, defaults to None.
Sourcepub fn layout(
self,
layout: &'a PipelineLayout,
) -> ComputePipelineDescriptorBuilder<'a, SetLayout<CS>>where
CS::Layout: LayoutIsEmpty,
pub fn layout(
self,
layout: &'a PipelineLayout,
) -> ComputePipelineDescriptorBuilder<'a, SetLayout<CS>>where
CS::Layout: LayoutIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::layout. Optional, defaults to None.
Sourcepub fn maybe_layout(
self,
layout: Option<&'a PipelineLayout>,
) -> ComputePipelineDescriptorBuilder<'a, SetLayout<CS>>where
CS::Layout: LayoutIsEmpty,
pub fn maybe_layout(
self,
layout: Option<&'a PipelineLayout>,
) -> ComputePipelineDescriptorBuilder<'a, SetLayout<CS>>where
CS::Layout: LayoutIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::layout. Optional, defaults to None.
Sourcepub fn module(
self,
module: &'a ShaderModule,
) -> ComputePipelineDescriptorBuilder<'a, SetModule<CS>>where
CS::Module: ModuleIsEmpty,
pub fn module(
self,
module: &'a ShaderModule,
) -> ComputePipelineDescriptorBuilder<'a, SetModule<CS>>where
CS::Module: ModuleIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::module. Required.
Sourcepub fn entry_point(
self,
entry_point: &'a str,
) -> ComputePipelineDescriptorBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
pub fn entry_point(
self,
entry_point: &'a str,
) -> ComputePipelineDescriptorBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::entry_point. Optional, defaults to None.
Sourcepub fn maybe_entry_point(
self,
entry_point: Option<&'a str>,
) -> ComputePipelineDescriptorBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
pub fn maybe_entry_point(
self,
entry_point: Option<&'a str>,
) -> ComputePipelineDescriptorBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::entry_point. Optional, defaults to None.
Sourcepub fn compilation_options(
self,
compilation_options: impl Nested<PipelineCompilationOptions<'a>>,
) -> ComputePipelineDescriptorBuilder<'a, SetCompilationOptions<CS>>where
CS::CompilationOptions: CompilationOptionsIsEmpty,
pub fn compilation_options(
self,
compilation_options: impl Nested<PipelineCompilationOptions<'a>>,
) -> ComputePipelineDescriptorBuilder<'a, SetCompilationOptions<CS>>where
CS::CompilationOptions: CompilationOptionsIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::compilation_options. Optional, defaults to wgpu::PipelineCompilationOptions::default().
Sourcepub fn cache(
self,
cache: &'a PipelineCache,
) -> ComputePipelineDescriptorBuilder<'a, SetCache<CS>>where
CS::Cache: CacheIsEmpty,
pub fn cache(
self,
cache: &'a PipelineCache,
) -> ComputePipelineDescriptorBuilder<'a, SetCache<CS>>where
CS::Cache: CacheIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::cache. Optional, defaults to None.
Sourcepub fn maybe_cache(
self,
cache: Option<&'a PipelineCache>,
) -> ComputePipelineDescriptorBuilder<'a, SetCache<CS>>where
CS::Cache: CacheIsEmpty,
pub fn maybe_cache(
self,
cache: Option<&'a PipelineCache>,
) -> ComputePipelineDescriptorBuilder<'a, SetCache<CS>>where
CS::Cache: CacheIsEmpty,
Setter for wgpu::ComputePipelineDescriptor::cache. Optional, defaults to None.