mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 19:55:37 +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>
19 lines
254 B
HLSL
19 lines
254 B
HLSL
struct S_6 {
|
|
float3 field0[13][18];
|
|
};
|
|
|
|
static float4x4 x_75[58] = (float4x4[58])0;
|
|
|
|
static S_6 x_82[46] = (S_6[46])0;
|
|
static float3 x_85[37] = (float3[37])0;
|
|
|
|
void main_1() {
|
|
const uint x_88 = 58u;
|
|
return;
|
|
}
|
|
|
|
void main() {
|
|
main_1();
|
|
return;
|
|
}
|