From d146c8a7a2eda987b3140a3e7fa254710af53ad8 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 11 Apr 2023 23:02:38 +0000 Subject: [PATCH] Enable multiplanar for SPIRV fuzzers. This CL updates the common fuzzer code to enable the multiplanar extension for the SPIR-V backend. Bug: chromium:1427801 Change-Id: Ie03d3e10f7831ca851aa11c00cbac0aa474ccabb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/126920 Kokoro: Kokoro Commit-Queue: Dan Sinclair Reviewed-by: Ben Clayton --- src/tint/fuzzers/tint_common_fuzzer.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tint/fuzzers/tint_common_fuzzer.cc b/src/tint/fuzzers/tint_common_fuzzer.cc index 9813cfc40c..6be9b982d5 100644 --- a/src/tint/fuzzers/tint_common_fuzzer.cc +++ b/src/tint/fuzzers/tint_common_fuzzer.cc @@ -263,7 +263,8 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) { // For the generates which use MultiPlanar, make sure the configuration options are provided so // that the transformer will execute. - if (output_ == OutputFormat::kMSL || output_ == OutputFormat::kHLSL) { + if (output_ == OutputFormat::kMSL || output_ == OutputFormat::kHLSL || + output_ == OutputFormat::kSpv) { // Gather external texture binding information // Collect next valid binding number per group std::unordered_map group_to_next_binding_number; @@ -299,6 +300,10 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) { options_hlsl_.external_texture_options.bindings_map = new_bindings_map; break; } + case OutputFormat::kSpv: { + options_spirv_.external_texture_options.bindings_map = new_bindings_map; + break; + } default: break; }