Skip to content

Wrong code in website? #38

@iampi31415

Description

@iampi31415
const device = await adapter.requestDevice();
if (!device) throw Error("Couldn’t request WebGPU logical device.");

Should take into account:

GPUAdapter.requestDevice() will never return null, and it will reject only if the request is invalid, i.e. it exceeds the capabilities of the GPUAdapter.

I think device.lost.then(()=>...) needs to replace that code.

MDN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions