Skip to content

Dynamic WebGPU support detection #2804

@daxpedda

Description

@daxpedda

Is your feature request related to a problem? Please describe.
It's not really a problem at the moment, because no stable browser has WebGPU support turned on by default, yet. In the future, it would be great to be able to ship a single binary in WASM that supports both WebGL and WebGPU, depending on browser support.
Currently this is impossible, as selecting the webgl crate feature automatically disables the WebGPU backend.

Describe the solution you'd like
Detecting WebGPU support in the browser is fairly easy. So depending on it's availability, the correct backend should be chosen automatically by wgpu.

Describe alternatives you've considered
The only solution I can come up with right now, is to have two binaries. Either detect support in the browser and load the appropriate WASM binary, or ship the appropriate binary by the server depending on the requesting browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiIssues related to API surfacebackend: webgpuIssues with direct interface with WebGPUhelp requiredWe need community help to make this happen.type: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions