Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Dec 11, 2024
1 parent fd7834a commit 33c0d79
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 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
3 changes: 0 additions & 3 deletions src/common/util/navigator_gpu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ export function setDefaultRequestAdapterOptions(options: GPURequestAdapterOption
throw new Error('must call setDefaultRequestAdapterOptions before getGPU');
}
defaultRequestAdapterOptions = { ...options };
// MAINTENANCE_TODO: remove this once compatibilityMode is removed.
defaultRequestAdapterOptions.featureLevel =
'compatibilityMode' in options && options.compatibilityMode ? 'compatibility' : 'core';
}

export function getDefaultRequestAdapterOptions() {
Expand Down
1 change: 1 addition & 0 deletions src/webgpu/api/operation/adapter/info.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ g.test('adapter_info')
.fn(async t => {
const gpu = getGPU(t.rec);
const adapter = await gpu.requestAdapter();
console.log(adapter);
assert(adapter !== null);

const adapterInfo = adapter.info;
Expand Down

0 comments on commit 33c0d79

Please sign in to comment.