Use Tint as much as possible in fuzzers.

Force the use_tint_generator toggle so that Tint is used as much as
possible in fuzzers to get coverage of the relevant code.

This will also fix a recurring fuzzer issue that required a code
transform that only exists in the Tint path: bindings must be renumbered
otherwise we hit an integer overflow in Swiftshader's descriptor set
writes.

Bug: chromium:1209602
Change-Id: Ie868fb07306f96a8ecf42a687313e0a466041a45
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51240
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp b/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp
index 7921136..ae7c05a 100644
--- a/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp
@@ -34,7 +34,12 @@
 
                 if (properties.backendType == wgpu::BackendType::D3D12 &&
                     properties.adapterType == wgpu::AdapterType::CPU) {
-                    device = wgpu::Device::Acquire(adapter.CreateDevice());
+                    // Force usage of Tint to provide coverage of that code path until it becomes
+                    // the default.
+                    dawn_native::DeviceDescriptor desc;
+                    desc.forceEnabledToggles.push_back("use_tint_generator");
+
+                    device = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
                     break;
                 }
             }
diff --git a/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp b/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp
index f41b8cb..3b1480c 100644
--- a/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp
@@ -34,7 +34,12 @@
                 adapter.GetProperties(&properties);
 
                 if (properties.backendType == wgpu::BackendType::Null) {
-                    nullDevice = wgpu::Device::Acquire(adapter.CreateDevice());
+                    // Force usage of Tint to provide coverage of that code path until it becomes
+                    // the default.
+                    dawn_native::DeviceDescriptor desc;
+                    desc.forceEnabledToggles.push_back("use_tint_generator");
+
+                    nullDevice = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
                     break;
                 }
             }
diff --git a/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp b/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp
index b23b132..0159a48 100644
--- a/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp
+++ b/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp
@@ -34,7 +34,12 @@
 
                 if (properties.backendType == wgpu::BackendType::Vulkan &&
                     properties.adapterType == wgpu::AdapterType::CPU) {
-                    device = wgpu::Device::Acquire(adapter.CreateDevice());
+                    // Force usage of Tint to provide coverage of that code path until it becomes
+                    // the default.
+                    dawn_native::DeviceDescriptor desc;
+                    desc.forceEnabledToggles.push_back("use_tint_generator");
+
+                    device = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
                     break;
                 }
             }