Skip to content

Commit 4ab91d4

Browse files
Use adapter.info when available instead of requestAdapterInfo (#17051)
* Use adapter.info when available instead of requestAdapterInfo * Update package.json
1 parent 31f4721 commit 4ab91d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@types/node": "^20.4.5",
2626
"@typescript-eslint/eslint-plugin": "^5.59.6",
2727
"@typescript-eslint/parser": "^5.59.6",
28-
"@webgpu/types": "^0.1.40",
28+
"@webgpu/types": "^0.1.42",
2929
"eslint": "^8.41.0",
3030
"jest": "^26.0.1",
3131
"rollup": "^2.56.2",

web/src/webgpu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export async function detectGPUDevice(): Promise<GPUDeviceDetectOutput | undefin
105105
requiredFeatures.push("shader-f16");
106106
}
107107

108-
const adapterInfo = await adapter.requestAdapterInfo();
108+
const adapterInfo = adapter.info || await adapter.requestAdapterInfo();
109109
const device = await adapter.requestDevice({
110110
requiredLimits: {
111111
maxBufferSize: requiredMaxBufferSize,

0 commit comments

Comments
 (0)