Default dawn_use_swiftshader to true SwiftShader is required to implement WebGPU fallback adapters. Perf tests are skipped for CPU adapters since they easily timeout for intensive benchmarks. Bug: chromium:1266550 Change-Id: Ib6e91da1128baae1770c797a69cf9ad605ea324d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/76421 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/scripts/dawn_features.gni b/scripts/dawn_features.gni index 03d3449..d00ab62 100644 --- a/scripts/dawn_features.gni +++ b/scripts/dawn_features.gni
@@ -32,13 +32,9 @@ declare_args() { dawn_use_angle = true - # Enables usage of swiftshader on the Vulkan backend. - # Note that this will only work in standalone and in projects that set the - # dawn_swiftshader_dir variable in build_overrides/dawn.gni - # Because of how the Vulkan loader works, setting this makes Dawn only able - # to find the Swiftshader ICD and not the others. - # Enabled by default when fuzzing. - dawn_use_swiftshader = build_with_chromium && use_fuzzing_engine + # Enables SwiftShader as the fallback adapter. Requires dawn_swiftshader_dir + # to be set to take effect. + dawn_use_swiftshader = true } declare_args() {
diff --git a/src/tests/perf_tests/DawnPerfTest.h b/src/tests/perf_tests/DawnPerfTest.h index 176029c..1781fc5 100644 --- a/src/tests/perf_tests/DawnPerfTest.h +++ b/src/tests/perf_tests/DawnPerfTest.h
@@ -115,6 +115,13 @@ : DawnTestWithParams<Params>(), DawnPerfTestBase(this, iterationsPerStep, maxStepsInFlight) { } + void SetUp() override { + DawnTestWithParams<Params>::SetUp(); + + wgpu::AdapterProperties properties; + this->GetAdapter().GetProperties(&properties); + DAWN_TEST_UNSUPPORTED_IF(properties.adapterType == wgpu::AdapterType::CPU); + } ~DawnPerfTestWithParams() override = default; };