Skip to content

Commit

Permalink
Use adapter.info when available instead of requestAdapterInfo (#17051)
Browse files Browse the repository at this point in the history
* Use adapter.info when available instead of requestAdapterInfo

* Update package.json
  • Loading branch information
beaufortfrancois authored Jun 1, 2024
1 parent 31f4721 commit 4ab91d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"@webgpu/types": "^0.1.40",
"@webgpu/types": "^0.1.42",
"eslint": "^8.41.0",
"jest": "^26.0.1",
"rollup": "^2.56.2",
Expand Down
2 changes: 1 addition & 1 deletion web/src/webgpu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export async function detectGPUDevice(): Promise<GPUDeviceDetectOutput | undefin
requiredFeatures.push("shader-f16");
}

const adapterInfo = await adapter.requestAdapterInfo();
const adapterInfo = adapter.info || await adapter.requestAdapterInfo();
const device = await adapter.requestDevice({
requiredLimits: {
maxBufferSize: requiredMaxBufferSize,
Expand Down

0 comments on commit 4ab91d4

Please sign in to comment.