pub struct Constant {
pub id: u32,
pub value: f64,
}Expand description
a pipeline-overridable constant: WGSL @id(id) override, SPIR-V SpecId id. The value
is an f64 as in WebGPU’s GPUProgrammableStage.constants and is converted to the
override’s type the way WebGPU converts it: bool true unless 0 or NaN; i32 / u32 (and the
other integers) truncated toward 0, Invalid when not finite or out of range; f32 / f16 /
f64 rounded to nearest, Invalid when not finite or out of range. An id the module does not
declare, or the same id twice, is Invalid (Vulkan would ignore it; WebGPU does not).
Overrides the pipeline leaves out keep the module’s default.
Fields§
§id: u32§value: f64Trait Implementations§
impl Copy for Constant
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Forget for Constant
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnsafeUnpin for Constant
impl UnwindSafe for Constant
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
Mutably borrows from an owned value. Read more