wgpu/naga/tests/in/f64.wgsl
Jim Blandy eb92ab2878 [naga wgsl] Experimental 64-bit floating-point literals.
In the WGSL front and back ends, support an `lf` suffix on
floating-point literals to yield 64-bit integer literals.
2023-11-23 12:17:21 +01:00

14 lines
215 B
WebGPU Shading Language

var<private> v: f64 = 1lf;
const k: f64 = 2.0lf;
fn f(x: f64) -> f64 {
let y: f64 = 3e1lf + 4.0e2lf;
var z = y + f64(5);
return x + y + k + 5.0lf;
}
@compute @workgroup_size(1)
fn main() {
f(6.0lf);
}