-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Update to wgpu
0.17.0
#3170
Update to wgpu
0.17.0
#3170
Conversation
This required bumping wasm-bindgen to 0.2.87
Would it be possible to remove the minor part of the version number, i.e. |
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.
👍
This actually breaks the web build because of wgpu's Send/Sync changes. @Aaron1011 do you have time to look into that? |
This is tricky - the I think our two options are:
|
I solved the typemap problem in my project by choosing the concurrent version based on the target_arch: #[cfg(not(target_arch = "wasm32"))]
use type_map::concurrent::TypeMap;
#[cfg(target_arch = "wasm32")]
use type_map::TypeMap; Maybe this would work for egui as well. Since most wasm code is single threaded anyways, I don't think it'd be necessary to have the concurrent typemap on wasm. |
@lucasmerlin: My concern is that doing that would make it unnecessarily difficult for downstream crates to compile against wasm - using |
Huh, tricky. Agreed that the "infectious" |
I believe that gfx-rs/wgpu#3626 will unblock some lifetime constraint relaxtions (see gfx-rs/wgpu#1453). This might remove the need for egui to provide a |
That might very well be, but gfx-rs/wgpu#3626 has been in the works for very long and may not land all that soon. Also will definitely be a major release of wgpu, not a patch; so we're still stack with pre-arcanization. |
While getting rid of the typemap is nice, even after gfx-rs/wgpu#3626 lands it could take a while for them to fix gfx-rs/wgpu#1453 I'm really hoping that comes sooner rather than later though. The typemap setup is very annoying to work with when doing custom rendering. |
If everything goes to plan, expect to see both changes in 0.18. No hard promises though. |
As said above, perhaps We are no worse off than with wgpu 0.16.0, and a proper fix can hopefully be included in a future wgpu 0.18.0/0.19.0 update. |
Sounds good to me @fornwall |
@Aaron1011 Is setting |
Tested natively on Mac, as well as on Web. |
Sorry for the delay in getting to this - thank you for taking care of this! |
FWIW In any case, great work here! |
This required bumping wasm-bindgen to 0.2.87