mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-12 16:15:55 +00:00
When an OpConstantComposite result is used by multiple instructions, declare it as a module-scope `const` instead of inlining the constant at each use site. This fixes an issue whereby the spirv-reader was massively inflating the size of the WGSL it produces, which was caught via an OOM fuzzer bug. Bug: oss-fuzz:57795 Change-Id: Iac8c6a2147a7e2ebfddbaacae9fcb1dbe0b59e9d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128881 Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com> Commit-Queue: David Neto <dneto@google.com>
49 lines
454 B
GLSL
49 lines
454 B
GLSL
#version 310 es
|
|
precision highp float;
|
|
|
|
struct S {
|
|
mat3 field0;
|
|
};
|
|
|
|
struct S_1 {
|
|
S field0[47][21][83];
|
|
};
|
|
|
|
struct S_2 {
|
|
vec3 field0[95][37];
|
|
};
|
|
|
|
struct S_3 {
|
|
S_2 field0;
|
|
};
|
|
|
|
struct S_4 {
|
|
ivec2 field0[56];
|
|
};
|
|
|
|
struct S_5 {
|
|
S_4 field0;
|
|
};
|
|
|
|
struct S_6 {
|
|
vec3 field0[13][18];
|
|
};
|
|
|
|
struct S_7 {
|
|
ivec2 field0[88];
|
|
};
|
|
|
|
void main_1() {
|
|
uint x_88 = 58u;
|
|
return;
|
|
}
|
|
|
|
void tint_symbol() {
|
|
main_1();
|
|
}
|
|
|
|
void main() {
|
|
tint_symbol();
|
|
return;
|
|
}
|