Documentation
¶
Overview ¶
Package pipeconst checks the pipeline-overridable constants of a pipeline stage (WebGPU GPUProgrammableStage.constants) before any backend sees them.
It is the one check every build path shares: the native backends, -tags rust (wgpu-native) and js/wasm (the browser). It has no dependencies, so the browser build does not link naga for it.
What it checks is what a value can be wrong about without the shader:
- a key is never empty: webgpu.h refuses a null or empty key string (NonNullInputString), and no WGSL override has an empty identifier;
- a value is finite: GPUPipelineConstantValue is a WebIDL double, which refuses NaN and the infinities with a TypeError, and webgpu.h reports NonFiniteFloatValueError. This holds for a bool override too, where naga's own conversion would read NaN as false.
Unknown keys, values out of the override's range and overrides without a value or a default need the shader; naga.ProcessOverrides reports them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyKey is the reason for a constant whose key is "". ErrEmptyKey = errors.New("key must not be empty") // ErrNotFinite is the reason for a constant whose value is NaN or an // infinity. ErrNotFinite = errors.New("value must be finite") )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.