-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
eframe/ egui-wgpu incompatibility with newer wgpu versions #4657
Comments
I've played a bit around with the egui_demo_app. Increasing the wgpu dependency of the egui workspace causes a few dependency issues (not just in cargo), but if you fix all these, the result works. Heres the commit with all changes: 9SMTM6@3d0c5cd. This is certainly interesting, and maybe a hotfix for me (I'll test what happens if I patch egui to this version) but of course no permanent fix for this, this issue is likely to happen again when other changes are made to wgpu. I'm still not sure what exactly is going on under the hood TBH. The wasm package process is fairly complex, perhaps theres some checks missing there. With the compiler errors I get, and looking at the way dependencies are declared in the Cargo.toml, its certainly not unifying these WGPU dependencies at rustc/cargo level. But perhaps its unifying some wgpu artifacts in the generated package?! |
Patching the template app dependencies on egui and eframe to use the version with the upgraded wgpu fixes the issue. Actually it fixes when directly depending on either wgpu version, but at this point I don't do anything with my wgpu dependency. I'd theorize that doing something with wgpu MIGHT cause the issue to re-appear (unless its really limited to the initialization, egui/eframe gets to that before me). |
Indeed, I get a very similar error in Firefox if I add the wgsl shader example to the latest state of the template that worked with both wgpu versions, and depend directly on 19.1. Nice to have that nailed down. Still really not sure where things go wrong in the packaging. Note that while upgrading to 20.1 isn't possible because of compiler errors. |
Describe the bug
In at least my build context (coming up), depending directly on wgpu version
20.1
(current) leads to a crash in Firefox (probably in all browsers that don't support WebGPU, it works on Chrome with enabled WebGPU). Heres the log in Firefox:As said, executing this in at least the one browser that supports WebGPU on stable doesnt cause an error, and additionally matching the version of wgpu that egui depends on (that being
19.1
) also fixes the issue with wgpu falling back to WebGL rendering.The build-context is the eframe template with wgpu added (as feature and direct dependency), and of course no glow feature (though in earlier experimentation re-adding it did not make a difference), I also added the wayland feature, but I dont think that makes a difference.
I want the wgpu dependency because I want to render a custom shader.
So its run/build with
trunk build
.Trying to run this with the master tree of egui and eframe leads to other runtime errors down the line.
Heres a diff between the state from the template and the issue that displays the error (if wgpu dependency is changed to 20.1): https://github.com/9SMTM6/mcmc-demo/compare/initial_template%E2%80%A6wgpu_dependency_issue
To Reproduce
Steps to reproduce the behavior (this has not been tested in its entirety):
Expected behavior
Essentially what happens if downgrade the dependency to
19.1
, it detects that WebGPU is not enabled and falls back to WebGL rendering.Alternatively at least some dependency resolution error, because there does seem to be a breaking change of wgpu but still some kind of dependency unification of the eframe/egui wgpu dependency with my direct one.
Screenshots
Not applicable
Desktop (please complete the following information):
Smartphone (please complete the following information):
not tested
Additional context
Cant think of anything else relevant.
The text was updated successfully, but these errors were encountered: