-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update egui-wgpu to use wgpu version 28.0.0 #7789
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
base: main
Are you sure you want to change the base?
Conversation
|
Preview available at https://egui-pr-preview.github.io/pr/7789-wgpu-update View snapshot changes at kitdiff |
|
|
||
| [toolchain] | ||
| channel = "1.88.0" | ||
| channel = "1.92.0" |
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.
Usually a proper and comprehensive MSRV bump is done first, see: #7579
`clippy::unchecked_time_subtraction`
`clippy::needless_doctest_main`
`wasm32-unknown-unknown`
* Reduce the diff for emilk#7793
Previously, when loading a variable font (e.g. via `egui::FontData::from_static`), the font was rendered using the default (often the lightest) weight, ignoring any preferred weight configuration. This change applies the specified weight to skrifa's `Location` for the `wght` axis, ensuring that variable fonts are rendered with the intended font weight. ## Summary Fixes variable font weight not being applied during rendering. The `FontData::weight()` method now properly configures the font variation axis. ## Changes - Add `location: Location` field to `FontFace` to store variation coordinates - Pass `location` parameter through to glyph rendering functions - Apply weight to skrifa's `LocationRef` in `DrawSettings` and `HintingInstance` ## Weight Priority 1. `preferred_weight` from `FontData::weight()` 2. OS/2 table's `us_weight_class` 3. Variable font's fvar default value 4. `Location::default()` ## Related Issue - emilk#3218 : Not follow font id, but goal would be same ## Todo * [x] Apply preferred font weight when loading variable fonts * [ ] Add small size variable fonts for docs and egui (need discussion)
`wgpu::RenderPassDescriptor`
|
The windows build is failing due to two different versions of the This can be resolved by letting cargo regenerate I've not had an issue like this before, and I'm unsure of the broader implications of regenerating Is this a reasonable fix? |
|
Ah, it seems I've discovered the broader implications... We now fail the checks of the I'm not sure how to move forward with this now. Any input would be greatly appreciated. |
|
Without being an expert and especially knowing the context: Editing a lockfile is usually never the right choice. Not in Rust, not in nodeJS. If it were, there'd be no need to version the lockfile or have it after all. The lockfile pins all dependencies, especially transitives to the exact version (~ commit), to have "reproducable" builds. If those versions would change, you could have slight changes in behavior that are very hard to debug because they are unexpected. Instead, one should always edit the Cargo.toml and have the resolver update the lock as a consequence, because after all you updating the WGPU version made it think that there are two versions of the windows crate necessary. If there weren't conflicting dependency versions, it would've tried to settle on one. That's also the case at least for https://github.com/emilk/egui/actions/runs/20405854417/job/58635443776?pr=7789#logs partially, deny found out that we're having two versions of the png crate as well somewhere in the hierarchy (and conveniently prints us the hierarchy). Additionally, deny found some dependencies with unsupported licenses, this could be the direct result of updating the lock file: Dependencies changed their dependencies and now include dependencies with unknown licenses or changed their license. Alright, if we revert back to 209ec7a. If you use For 0.61.1: And for 0.62.2: So, my guess is that the culprit is accesskit_windows/accesskit_winit needing a bump to a version where they used 0.62.2 as well. It shouldn't be a problem with gpu-allocator v0.28.0, because clearly wgpu-hal's dependency on windows would be faulty, then. I guess it just chose the lower one by default. And then, you'll be looking at png, where we saw the problem as well in the deny reports. |
|
For what it's worth, I am using this pull request currently to allow myself to use WGPU v28, and I have no issues, including a resolution to the double windows dependency issue I was having when I first upgraded to WGPU 28. I am building on windows 11 25H2 26220.7523 in release mode using the nightly toolchain. Here is my cargo.toml (the pertinent parts) - don't judge if something is weird, I am not well-versed in these config files yet and I am positive I am doing some goofy things: Not sure if this will help or is relevant, but figured maybe I'd share just in case. |
This is a small patch to update the
wgpudependency from version 27.0.1 to 28.0.0. The changes are minor, requiring only a few updates to descriptor initializers for the updated multiview and immediates (formally push constants) fields.The changes are working without any obvious issues in my own project. However, I've not yet been able to run the check script due to the extra dependencies required not being available in my development environment. I will attempt this again later.
Please note that
wgpunow requires a minimum toolchain version of 1.92.0, so I have updated therust-toolchainfile accordingly. I'm not sure if the toolchain version change has larger implications for the project?This is my first pull request. I'm hoping it meets the criteria for a small change, and therefore doesn't need an issue first.