dawn-cmake/test/tint/bug/oss-fuzz/57795.spv.expected.wgsl
James Price 506b4f05d0 [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>
2023-05-23 18:28:44 +00:00

58 lines
1.8 KiB
WebGPU Shading Language

struct S {
field0 : mat3x3f,
}
struct S_1 {
field0 : array<array<array<S, 83u>, 21u>, 47u>,
}
struct S_2 {
field0 : array<array<vec3f, 37u>, 95u>,
}
struct S_3 {
field0 : S_2,
}
struct S_4 {
field0 : array<vec2i, 56u>,
}
struct S_5 {
field0 : S_4,
}
struct S_6 {
field0 : array<array<vec3f, 18u>, 13u>,
}
struct S_7 {
field0 : array<vec2i, 88u>,
}
const x_72 = vec4f(0.0f, 0.0f, 0.0f, 0.0f);
const x_73 = mat4x4f(x_72, x_72, x_72, x_72);
var<private> x_75 = array<mat4x4f, 58u>(x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73);
const x_77 = vec3f(0.0f, 0.0f, 0.0f);
const x_78 = array<vec3f, 18u>(x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77);
const x_80 = S_6(array<array<vec3f, 18u>, 13u>(x_78, x_78, x_78, x_78, x_78, x_78, x_78, x_78, x_78, x_78, x_78, x_78, x_78));
var<private> x_82 = array<S_6, 46u>(x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80, x_80);
var<private> x_85 = array<vec3f, 37u>(x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77, x_77);
fn main_1() {
let x_88 = 58u;
return;
}
@fragment
fn main() {
main_1();
}