Function wgpu::core::naga::back::pipeline_constants::process_overrides
source · pub fn process_overrides<'a>(
module: &'a Module,
module_info: &'a ModuleInfo,
pipeline_constants: &HashMap<String, f64>
) -> Result<(Cow<'a, Module>, Cow<'a, ModuleInfo>), PipelineConstantError>
Available on
wgpu_core
and (crate features hlsl-out
or msl-out
or spv-out
or glsl-out
) only.Expand description
Replace all overrides in module
with constants.
If no changes are needed, this just returns Cow::Borrowed
references to module
and module_info
. Otherwise, it clones
module
, edits its global_expressions
arena to contain only
fully-evaluated expressions, and returns Cow::Owned
values
holding the simplified module and its validation results.
In either case, the module returned has an empty overrides
arena, and the global_expressions
arena contains only
fully-evaluated expressions.