diff --git a/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp b/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp index 79211361a8..ae7c05a364 100644 --- a/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp +++ b/src/fuzzers/DawnWireServerAndD3D12BackendFuzzer.cpp @@ -34,7 +34,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 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 f41b8cb195..3b1480caa0 100644 --- a/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp +++ b/src/fuzzers/DawnWireServerAndFrontendFuzzer.cpp @@ -34,7 +34,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 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 b23b132e8c..0159a48252 100644 --- a/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp +++ b/src/fuzzers/DawnWireServerAndVulkanBackendFuzzer.cpp @@ -34,7 +34,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 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; } }