Return helpful error when WebGPU is disabled#9319
Open
emilk wants to merge 3 commits intogfx-rs:trunkfrom
Open
Return helpful error when WebGPU is disabled#9319emilk wants to merge 3 commits intogfx-rs:trunkfrom
emilk wants to merge 3 commits intogfx-rs:trunkfrom
Conversation
This was referenced Mar 27, 2026
Wumpf
approved these changes
Mar 27, 2026
Member
Wumpf
left a comment
There was a problem hiding this comment.
Curious that we get an non-null object back that simply isn't a GpuCanvasContext and not an error either. Nasty. But I believe it. Curious what that object is for you, would be nice if you could provide that information, but lgtm either way - can't be defensive enough I figure 🤷
emilk
added a commit
to emilk/egui
that referenced
this pull request
Mar 27, 2026
* Fix for emilk/eframe_template#223 * Related: gfx-rs/wgpu#9319 By default, we would only turn on the WebGPU backend on web, which means browsers without WebGPU support would just crash. You can still opt-out of all the default `wgpu` features by enabling `eframe/wgpu_no_default_features` instead of `eframe/wgpu`
auto-merge was automatically disabled
March 27, 2026 10:17
Head branch was pushed to by a user without write access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wgpubackend: Enable WebGL fallback emilk/egui#8038Previously, if WebGPU was disabled in the browser,
wgpuwould crash with a very unhelpful error message:Tested in Firefox