-
Notifications
You must be signed in to change notification settings - Fork 136
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
chore: update wgpu to 0.19 #427
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.
Looks good, thanks for doing this. Some comments from a first pass
I've not run the example yet
Can you please link #411?
examples/with_winit/src/lib.rs
Outdated
Key::Named(NamedKey::Space) => { | ||
transform = Affine::IDENTITY; | ||
} | ||
Key::Character("s") => { |
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.
Same concern about caps lock for all of these
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.
So regarding caps lock: I didn't consider it even, thinking winit would ignore modifiers, and act like it used to before.
I reworked the code: Winit does expose a way to ignore modifiers on key via a KeyEventExtModifierSupplement
trait, however oddly enough its not exposed for a web target, so we cannot use it here, so now will just use to_lowercase
.
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.
Sorry it's taken a while to review, I've taken a few weeks off.
Overall, this looks like a good update, thanks.
Unfortunately, this no longer compiles for Android. I needed to make two changes for that to work:
- Adding the suggested
expect
- I have not yet dug into why this is now fallible in winit. I can do so if you want - Changing the run command to
cargo apk run -p with_winit --lib
(that is, the wrong command is documented in the README). I don't know why this change was necessary, but I also need it on main, so it's not a result of this PR.
We will likely add CI for android at some point, but that isn't currently present
"q" | "e" => { | ||
if let Some(prior_position) = prior_position { | ||
let is_clockwise = char == "e"; | ||
let angle = if is_clockwise { -0.05 } else { 0.05 }; |
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.
I'm seeing some weird behaviour here, where pressing e
now rotates anticlockwise
However, this is also present on main, so that's not an issue from this PR.
stats_shown = !stats_shown; | ||
} | ||
"d" => { | ||
complexity_shown = !complexity_shown; |
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 no longer works on my machine, but this is also a pre-existing issue from before this PR
`specta` from Hypercube's fork commit to latest upstream commit `wasm-bindgen` 0.2.87 -> 0.2.91 `spirv-std` from 0.9 to not-yet-merged commit in EmbarkStudios/rust-gpu#1115 `wgpu` 0.17 -> 0.19 `winit` 0.28.6 -> 0.29 `vello` and `vello_svg` from latest upstream commit to not-yet-merged commit in linebender/vello#427 `resvg` 0.36.0 -> 0.39 `glam` 0.24 -> 0.25 `rustybuzz` 0.8.0 -> 0.10.0 `js-sys` and `web-sys` 0.3.55 -> 0.3.67 `usvg` 0.36.0 -> 0.39 `spirv` 0.2.0 -> 0.3 * Update a couple of dependencies * More test fixing… * Use upstream Specta instead of fork * Update comments in Cargo.toml --------- Co-authored-by: Keavon Chambers <[email protected]>
I was just about to make a similar PR, and before doing it forgot to look if there were any outstanding. https://github.com/ratmice/vello/tree/update_wgpu If that kind of change is wanted I could perhaps make a separate PR for it once this one goes in?
I had a bit of trouble figuring out which expect this is referring to, perhaps at the end of |
The let event_loop = EventLoopBuilder::with_user_event()
.with_android_app(app)
.build(); I haven't investigated why this is fallible yet |
Ahh, I see. The fallibility here is in the platform-independent part of winit: It looks like it only errors in the case that you call |
Closing, as this PR was merged as #444 Thanks for kicking this off! |
Also updates winit due to
raw-window-handle
changes