Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect if we're not in a WebGPU capable browser with an Instance that targets the BROWSER_WEBGPU backend. #5152

Open
Elabajaba opened this issue Jan 27, 2024 · 1 comment
Labels
area: api Issues related to API surface

Comments

@Elabajaba
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When you create an Instance that targets the BROWSER_WEBGPU backend, but not the GL backend, Instance::create_surface panics if you're using a browser that doesn't support WebGPU.

Describe the solution you'd like
Some way of knowing that we're not in a WebGPU capable browser with just an Instance

Describe alternatives you've considered
Instance::enumerate_adapters() doesn't work because it's always None for WebGPU backends.

@Wumpf
Copy link
Member

Wumpf commented Jan 28, 2024

It feels like we need to iterate on this whole store again a bit. Hit very related issues there:

(edit: linked wrong issue/pr at first)

Not yet sure exactly how to deal with all of this, but I think wgpu should expose the necessary tools to work with this in a sane(r) way.
The way enumerate_adapters is a wgpu-core only function is quite confusing, wondering if we should just bite the bullet and make it async in order to merge these paths again

@Wumpf Wumpf added the area: api Issues related to API surface label Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface
Projects
None yet
Development

No branches or pull requests

2 participants