mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
[spirv-reader] Use type inference for var and let
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>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
858ccc8a0c
commit
506b4f05d0
@@ -22,10 +22,10 @@ struct S {
|
||||
@group(0) @binding(0) var<storage, read_write> s : S;
|
||||
|
||||
fn f_1() {
|
||||
let x_19 : Arr_2 = s.a;
|
||||
let x_24 : Arr_1 = s.a[3i].el;
|
||||
let x_28 : Arr = s.a[3i].el[2i];
|
||||
let x_32 : f32 = s.a[3i].el[2i][1i].el;
|
||||
let x_19 = s.a;
|
||||
let x_24 = s.a[3i].el;
|
||||
let x_28 = s.a[3i].el[2i];
|
||||
let x_32 = s.a[3i].el[2i][1i].el;
|
||||
s.a = array<strided_arr_1, 4u>();
|
||||
s.a[3i].el[2i][1i].el = 5.0f;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user