dawn-cmake/test/tint/bug/oss-fuzz
James Price ae39e6d628 spirv-reader: Declare multiuse constant composites
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>
2023-04-25 19:16:25 +00:00
..
57795.spv spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00
57795.spv.expected.dxc.hlsl spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00
57795.spv.expected.fxc.hlsl spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00
57795.spv.expected.glsl spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00
57795.spv.expected.msl spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00
57795.spv.expected.spvasm spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00
57795.spv.expected.wgsl spirv-reader: Declare multiuse constant composites 2023-04-25 19:16:25 +00:00