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 <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair 2023-04-11 23:02:38 +00:00 committed by Dawn LUCI CQ
parent defda09e3c
commit d146c8a7a2
1 changed files with 6 additions and 1 deletions

View File

@ -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<uint32_t, uint32_t> 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;
}