mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 06:03:34 +00:00
When an initializer is present, use type inference instead of explicitly typing `var` and `let` declarations. This reduces the size of the generated WGSL and improves readability. Change-Id: I241ee2108279b550735945940f2b62bbbd493708 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132142 Commit-Queue: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Auto-Submit: James Price <jrprice@google.com> Reviewed-by: David Neto <dneto@google.com>
14 lines
230 B
WebGPU Shading Language
14 lines
230 B
WebGPU Shading Language
const x_10 = vec3f(1.0f, 2.0f, 3.0f);
|
|
|
|
fn main_1() {
|
|
let x_11 = x_10.y;
|
|
let x_13 = vec2f(x_10.x, x_10.z);
|
|
let x_14 = vec3f(x_10.x, x_10.z, x_10.y);
|
|
return;
|
|
}
|
|
|
|
@compute @workgroup_size(1i, 1i, 1i)
|
|
fn main() {
|
|
main_1();
|
|
}
|