Update SPIR-V Tools fuzzer
Updates spirv-tools DEPS to pull in some recent spirv-fuzz changes, and
modifies the SPIR-V Tools fuzzer so that inapplicable transformations
are ignored.
Change-Id: Ibdea6e9bc35224efe148133eced341168f7ce7b7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60209
Auto-Submit: Alastair Donaldson <afdx@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/DEPS b/DEPS
index 44d816c..8ff1499 100644
--- a/DEPS
+++ b/DEPS
@@ -13,7 +13,7 @@
'gpuweb_cts_revision': '177a4faf0a7ce6f8c64b42a715c634e363912a74',
'protobuf_revision': 'fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a',
'spirv_headers_revision': '1d4e3a7e3a04ba205ed8cb1485f7cb7369bec609',
- 'spirv_tools_revision': '640b17b5fbc65f2aed9106ad96ba40c51fa20195',
+ 'spirv_tools_revision': '9c4481419ec1710d1b098982ecffda6b7fad88a9',
'testing_revision': '2691851e49de541c3fe42fa8692ddcdee938162f',
}
diff --git a/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc b/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc
index dca10f1..c588813 100644
--- a/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc
+++ b/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc
@@ -49,6 +49,9 @@
std::make_unique<spvtools::fuzz::FactManager>(ir_context.get()),
validator_options_);
+ // The value 'true' is passed for ignore_inapplicable_transformations so that
+ // fuzzing continues even when transformations that should be applicable turn
+ // out to be inapplicable.
auto fuzzer_context = std::make_unique<spvtools::fuzz::FuzzerContext>(
std::make_unique<spvtools::fuzz::PseudoRandomGenerator>(seed),
spvtools::fuzz::FuzzerContext::GetMinFreshId(ir_context.get()), false);
@@ -56,7 +59,7 @@
std::move(ir_context), std::move(transformation_context),
std::move(fuzzer_context), util::GetBufferMessageConsumer(errors_.get()),
donors, enable_all_passes, repeated_pass_strategy,
- validate_after_each_pass, validator_options_);
+ validate_after_each_pass, validator_options_, true);
}
Mutator::Result SpirvFuzzMutator::Mutate() {