-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix assorted issues with WebGL #7448
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
Fix assorted issues with WebGL #7448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes assorted issues affecting WebGL support in the wasm examples, addressing build command consistency, dependency configuration, and error handling for wasm32 targets.
- Updated cargo build commands in the xtask runner to use package flags instead of binary flags.
- Expanded dependency lists for the "noop" feature and adjusted workspace dependency definitions.
- Modified error handling in wgpu-core for wasm32 to ignore timeouts.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
xtask/src/run_wasm.rs | Changed cargo build commands to use package flag (“-p”) instead of binary (“--bin”). |
wgpu/Cargo.toml | Added dependencies to "noop" feature for consistency with other backends. |
wgpu-core/src/device/global.rs | Added a wasm32-specific branch for ignoring WaitIdleError::Timeout. |
examples/features/Cargo.toml | Adjusted workspace dependencies for wgpu across target configurations. |
Cargo.toml | Removed the "webgl" feature from the wgpu dependency list. |
Comments suppressed due to low confidence (2)
xtask/src/run_wasm.rs:35
- Using the '-p' flag instead of '--bin' changes which artifact is built; please verify that this aligns with the intended build target and doesn't affect other build scenarios.
cargo build --target wasm32-unknown-unknown -p wgpu-examples --no-default-features --features webgpu {release_flag...}
Cargo.toml:70
- Removal of the 'webgl' feature from the wgpu dependency list should be reviewed carefully to ensure it doesn't break setups that depend on explicit webgl support.
"webgl",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:lezduit:
* Fix validation error when configuring the surface on WebGL * Remove unneeded `webgl` feature * Fix compilation of the `noop` backend on `wasm32` * Prevent `webgpu` examples from incorrectly falling back to WebGL * Reduce dependency set when building wasm examples * Fix various warnings
Connections
Fixes #7363
Description
Fixes various small issues with the wasm examples. Each commit is standalone and self-explainatory
Testing
Manually
Squash or Rebase?
Squash
Checklist
cargo fmt
.