Add spirv-tools fuzzer

This change adds a new tint fuzzer that uses SPIRV-Tools to fuzz SPIR-V binaries.
The fuzzer works on a corpus of SPIR-V shaders. For each shader from the corpus it uses
one of `spirv-fuzz`, `spirv-reduce` or `spirv-opt` to mutate and then runs the shader through
the Tint compiler in two steps:
- Converts the mutated shader to WGSL.
- Converts WGSL to some target language specified in the CLI arguments.

The list of all supported CLI arguments and their description is in the cli.h file.

Change-Id: I95c0741b78ccc600dd9a73c371d520bdf7814352
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41945
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Vasyl Teliman <vasniktel@gmail.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Alastair Donaldson <allydonaldson@googlemail.com>
This commit is contained in:
Vasyl Teliman
2021-06-24 18:10:46 +00:00
committed by Tint LUCI CQ
parent c3f19081f8
commit 0b3611b8c8
26 changed files with 2424 additions and 12 deletions

1
.gitignore vendored
View File

@@ -19,6 +19,7 @@ third_party/binutils
third_party/googletest
third_party/gpuweb-cts
third_party/llvm-build
third_party/protobuf
third_party/spirv-headers
third_party/spirv-tools
tools/clang