pub struct PipelineCompilationOptions<'a> {
pub constants: &'a [(&'a str, f64)],
pub zero_initialize_workgroup_memory: bool,
}Expand description
Advanced options for use when a pipeline is compiled
This implements Default, and for most users can be set to Default::default()
Fields§
§constants: &'a [(&'a str, f64)]Specifies the values of pipeline-overridable constants in the shader module.
If an @id attribute was specified on the declaration,
the key must be the pipeline constant ID as a decimal ASCII number; if not,
the key must be the constant’s identifier name.
If the given constant is specified more than once, the last value specified is used.
The value may represent any of WGSL’s concrete scalar types.
The default value is &[].
zero_initialize_workgroup_memory: boolWhether workgroup scoped memory will be initialized with zero values for this stage.
This is required by the WebGPU spec, but may have overhead which can be avoided for cross-platform applications
The default value is true.
Implementations§
Source§impl PipelineCompilationOptions<'_>
impl PipelineCompilationOptions<'_>
Sourcepub const fn default() -> Self
pub const fn default() -> Self
This function is identical to Default::default() except that it is a const fn.
Trait Implementations§
Source§impl<'a> Clone for PipelineCompilationOptions<'a>
impl<'a> Clone for PipelineCompilationOptions<'a>
Source§fn clone(&self) -> PipelineCompilationOptions<'a>
fn clone(&self) -> PipelineCompilationOptions<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for PipelineCompilationOptions<'a>
impl<'a> Debug for PipelineCompilationOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for PipelineCompilationOptions<'a>
impl<'a> RefUnwindSafe for PipelineCompilationOptions<'a>
impl<'a> Send for PipelineCompilationOptions<'a>
impl<'a> Sync for PipelineCompilationOptions<'a>
impl<'a> Unpin for PipelineCompilationOptions<'a>
impl<'a> UnwindSafe for PipelineCompilationOptions<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more