mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 23:04:07 +00:00
eb92ab2878
In the WGSL front and back ends, support an `lf` suffix on floating-point literals to yield 64-bit integer literals.
14 lines
215 B
WebGPU Shading Language
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);
|
|
}
|