Skip to content

Commit

Permalink
Set featureLevel: "compatibility" when compatibility=1 is enabled (#…
Browse files Browse the repository at this point in the history
…4081)

But keeps passing `compatibilityMode: true` as well.
  • Loading branch information
beaufortfrancois authored Dec 12, 2024
1 parent f1844b1 commit 5b26e0e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common/runtime/cmdline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/runtime/helper/utils_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }),
});
}

Expand Down
1 change: 1 addition & 0 deletions src/common/runtime/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/runtime/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
});
}
Expand Down

0 comments on commit 5b26e0e

Please sign in to comment.