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

Add utils for WebGPU support detection & Instance creation #6371

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Oct 5, 2024

Connections

Description
Targeting both WebGPU & WebGL at the same time works but is a pain right now. These new utilities and doc lines should make this a lot easier!

Would be nice to make use of this in the official examples, but don't quite know yet how - the examples on web today are geared towards explicit selection.

Testing

Testing done via https://github.com/Wumpf/minifb_wgpu_web_and_desktop/tree/better-webgpu-selection

  • test on native (should no-op)
  • test browser without navigator.gpu
  • test browser with navigator.gpu no actual webgpu support (Chrome on Linux!)
  • test on browser with webgpu support

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@Wumpf
Copy link
Member Author

Wumpf commented Oct 6, 2024

@rukai can you check if this solves the problem for you? I don't have a good repro setup for it right now
Either by using the new new_instance_with_webgpu_detection method yourself or by checking with running cargo xtask run-wasm on https://github.com/Wumpf/minifb_wgpu_web_and_desktop/tree/better-webgpu-selection
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webgl fallback fails in some browsers.
1 participant