From 5b26e0e8957b05b2a7ef76448a46b9901073f125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Thu, 12 Dec 2024 05:12:24 +0100 Subject: [PATCH] Set `featureLevel: "compatibility"` when compatibility=1 is enabled (#4081) But keeps passing `compatibilityMode: true` as well. --- src/common/runtime/cmdline.ts | 1 + src/common/runtime/helper/utils_worker.ts | 2 +- src/common/runtime/server.ts | 1 + src/common/runtime/standalone.ts | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/runtime/cmdline.ts b/src/common/runtime/cmdline.ts index c1e0c28d17c1..b2d220ec8ef9 100644 --- a/src/common/runtime/cmdline.ts +++ b/src/common/runtime/cmdline.ts @@ -124,6 +124,7 @@ if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ compatibilityMode: globalTestConfig.compatibility, + featureLevel: globalTestConfig.compatibility ? 'compatibility' : 'core', forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); } diff --git a/src/common/runtime/helper/utils_worker.ts b/src/common/runtime/helper/utils_worker.ts index 13880635bca7..5886839f6c33 100644 --- a/src/common/runtime/helper/utils_worker.ts +++ b/src/common/runtime/helper/utils_worker.ts @@ -27,7 +27,7 @@ export function setupWorkerEnvironment(ctsOptions: CTSOptions): Logger { setDefaultRequestAdapterOptions({ ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being - ...(compatibility && { compatibilityMode: true }), + ...(compatibility && { compatibilityMode: true, featureLevel: 'compatibility' }), }); } diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 38ad04479430..d908ce89ba7a 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -123,6 +123,7 @@ if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ compatibilityMode: globalTestConfig.compatibility, + featureLevel: globalTestConfig.compatibility ? 'compatibility' : 'core', forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); } diff --git a/src/common/runtime/standalone.ts b/src/common/runtime/standalone.ts index 0305031cc790..a079ac28dd98 100644 --- a/src/common/runtime/standalone.ts +++ b/src/common/runtime/standalone.ts @@ -85,7 +85,7 @@ if (powerPreference || compatibility || forceFallbackAdapter) { setDefaultRequestAdapterOptions({ ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being - ...(compatibility && { compatibilityMode: true }), + ...(compatibility && { compatibilityMode: true, featureLevel: 'compatibility' }), ...(forceFallbackAdapter && { forceFallbackAdapter: true }), }); }