Implement AST fuzzer

This change implements a new fuzzer. It mutates a WGSL shader by traversing
the AST of a program and applying various transformations that might or might not
be semantics preserving.

Change-Id: I6b144bd1067444c3f0b815ba1a646aaf6e739b52
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/52160
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Vasyl Teliman <vasniktel@gmail.com>
Reviewed-by: Alastair Donaldson <allydonaldson@googlemail.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Vasyl Teliman
2021-07-13 12:01:25 +00:00
committed by Tint LUCI CQ
parent 54d1ee6f11
commit c6bcab02fd
31 changed files with 2702 additions and 10 deletions

View File

@@ -17,8 +17,11 @@ if (${TINT_BUILD_TESTS} AND NOT TARGET gmock)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/googletest EXCLUDE_FROM_ALL)
endif()
if (${TINT_BUILD_SPIRV_TOOLS_FUZZER} AND (NOT TARGET protobuf::libprotobuf OR NOT TARGET protobuf::protoc))
set(SPIRV_BUILD_FUZZER ON CACHE BOOL "Build spirv-fuzz")
if ((${TINT_BUILD_SPIRV_TOOLS_FUZZER} OR ${TINT_BUILD_AST_FUZZER}) AND
(NOT TARGET protobuf::libprotobuf OR NOT TARGET protobuf::protoc))
if (${TINT_BUILD_SPIRV_TOOLS_FUZZER})
set(SPIRV_BUILD_FUZZER ON CACHE BOOL "Build spirv-fuzz")
endif()
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Disable protobuf tests")
set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Do not build protobuf static runtime")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/protobuf/cmake)