-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[d3d12 wgl] Upgrade to windows 0.62
crates
#6876
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: trunk
Are you sure you want to change the base?
Conversation
return Ok(()); | ||
} | ||
unsafe { OpenGL::wglMakeCurrent(None, None) } | ||
unsafe { OpenGL::wglMakeCurrent(Default::default(), Default::default()) } |
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.
@kennykerr can you help us here? I did not do my due diligence this time to search through windows-rs
and win32metadata
for relevant changes, but while most handles have been made optional (see other Some()
wrapping changes in this PR), quite strangely these parameters are no longer optional in wglMakeCurrent()
where they have a specific use-case to uncurrent the context.
Is this change intended or accidental? We can clearly get around it by passing a defaulted HDC
/HGLRC
, but it seems strange when compared to other functions where None
can be passed.
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.
The code generator now faithfully honors the metadata's [Optional]
attribute - in the case of wglMakeCurrent
the handle parameters are not optional whereas in the case of CreateSwapChainForCompositionSurfaceHandle
the handle parameter is optional.
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.
Thanks @kennykerr. So this'll take another trip through win32metadata
to annotate correctly.
7841fa7
to
d9cd506
Compare
Just to set expectations here, we likely can't merge this for a bit, as firefox is currently on 0.58 and migration will be a bit of a thing. @ErichDonGubler will take charge of this. I don't expect there to be a ton of problems with this PR just hanging out for a while. I'm going to mark this as draft as we can't merge it, but @Wumpf will review it still. |
@cwfitzgerald that's all good, I don't expect this to be merged until the upgrade has fully trickled through the ecosystem. Just making sure we have a PR open with all the necessary changes that I couldn't make in the original |
There are a few things that I'm already aware need to happen in
|
Regarding |
Under the assumption that windows-sys = { version = ">=0.58, <=0.59" See quinn-rs/quinn#2021 as an example from one of our upstream dependencies. @ErichDonGubler let me know what works best for you. |
This comment was marked as resolved.
This comment was marked as resolved.
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.
fwiw code lgtm and took it on a spin running examples locally
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
d9cd506
to
d44db74
Compare
@ErichDonGubler I think we can arrange this pretty quickly, let us know when the time is there (and you haven't yet upgraded to |
d44db74
to
77cef5a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Sorry I completely dropped the ball on this and there are quite a few new versions already. I'll get back to the second bump ASAP, as long as Mozilla is okay with the next bumps? |
@MarijnS95: The way to keep this tractable is almost certainly to keep uograde steps incremental, so don't feel like you need to throw away efforts to target 0.59 without a strong concrete blocker. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
We dropped |
1ac435d
to
f0aab50
Compare
I'm referring to 0.62, sorry for any confusion! Much of the ecosystem has caught up with 0.62, with some refusing to use range dependencies. I've also confirmed that we can build it in Firefox, done all the auditing work for new dependencies. The main supply chain task is some upstreaming before review that can be done incrementally per-dependency (see Bug 1991226 - Upgrade/audit most Rust deps. for WGPU revendor and I'll let you judge for yourself, though. I've put a PR for 0.62 up—based on work here—for your perusal: #8281 |
As already highlighted in #8013 (comment) three whole weeks ago
I thought I had also already shared https://github.com/MarijnS95/wgpu/compare/windows-69 with you those three weeks ago, and was merely waiting for confirmation to push it into this PR or #8013. |
f0aab50
to
9c05f41
Compare
9c05f41
to
4752a20
Compare
4752a20
to
231387f
Compare
Note that all these force-pushes to contributor PRs -in particular after such a long time of radio silence- seem a little disingenuous: I cannot even read the CI failure and |
Sure, but that only means WGPU specifically suffers from being an all-or-nothing upgrade WRT this When you submitted that comment three weeks ago, this was, unfortunately, not something I could justify looking at (and I'm still not sure that I can drive this to completion, based on Mozilla's current priorities). I'm trying to split a bit of attention to take a look at this now, though, because I think it's important for Mozilla to have concrete reasons for either letting things through or being blocked, rather than "I don't got bandwidth indefinitely, soz." |
Ah, sorry, I'm not trying to create obstacles for you! I'm happy to switch to appending |
I don't remember this being shared, but I think it's safe to say we've reached consensus for trying to target |
[sources.allow-org] | ||
github = ["gfx-rs"] |
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 have yet to revert this back out. I added command-arguments: -Dwarnings
to CI to catch some warnings that otherwise went unnoticed, but that includes unmatched allow-org
when there are (temporarily) no patches from this org...
Sure thing, having downstream dependencies commit to ranges (when possible) would be awesome and I've been trying to sneak them into crates whenever possible. Thus happen to contribute to quite a few too many, and it usually means preempting the maintainer or other contributors who are oblivious to this behavior (and getting the range extended backwards has thus far proven harder). Hadn't looked at the Bugzilla tracker but it looks like a lot of crates to repeatedly vet; any way that could be reduced by less aggressively bumping patch versions where not necessary for e.g. this Windows upgrade? Glad to see that you're at least trying to get something going here despite not finding time/priority. Apologies for the hasty response. Makes me fear the ever-increasing stack of PRs, issues and (mostly) complaints on popular repos that I'm supposed to be maintaining, ... 🤷 I'll happily keep #8013 up to date and rebased on this PR, and leave it to you whether to temporarily jump to |
I'd like to address this tension specifically, since I consider cultural gardening an important exercise:
As I'm sure you know, being radio-silent generally isn't a problem for one-off contributions. This case is already different; IMO, you've definitely earned some negotiating power on how you'd like to communicate, given how much (welcome) work you've been doing. Thoughts? I'm guessing you would have preferred that we told you specifically that we knew we didn't have immediate bandwidth for ☝🏻 CC @gfx-rs/wgpu. |
We tend not to repeatedly vet these crates, with the recent move in wgpu from Dependabot to Renovate. It was awful before that point. Those specific dependencies are getting updated in that patches series because IIRC some other crate required a new minimum version on the road to getting upgraded to support `windows 0.62. I don't remember specifics for these, though...there were many. 😅 |
RE: the set of PRs to keep open: I think consolidating everything into this PR would make things significantly easier to follow for everyone. We don't actually intend to land things incrementally, so multiple PRs sound only like additional complication. |
This was mostly in respect to first being on one end of the spectrum (no response for weeks) to then jumping all the way to the other with force-pushes and respin PRs (something I tend to use sparingly when a contributor hasn't responded for weeks and I really want to get their change in after some minor CI/review fixups).
Does that mean you're now skipping certain patch releases or just postponing the Renovate PRs until a vet is possible/completed?
Ah, yup, https://github.com/gfx-rs/wgpu/pull/8013/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e hits quite a lot of transitive bumps. Wish those were (mostly) unnecessary 😓 |
windows 0.59
crateswindows 0.62
crates
https://github.com/microsoft/windows-rs/releases/tag/0.61.0 The latest `windows 0.59` and `windows-core 0.59` crates were just released (strangely tagged `0.61`), including some minor code improvements for us. The MSRV has been bumped to `1.74`, but `wgpu` is already on `1.76` anyway.
Ah, that wasn't intended as a respin, sorry! I had pushed branches and a temp PR already so I had a stable point of reference for making sure things were viable in Firefox. I had no illusions that I'd get that through without working with you. The force-pushes were mostly so I could keep 0.62 changes on top of a rebased set of your patches. I promise I didn't change anything substantially! But then again...force-pushes on others' stuff still usually deserves more explanation than a ETA: Oh, yeah, I had also force-pushed to take care of a TOML formatting failure. |
Actually, we can have our cake and eat it, too. Renovate actually implements bumping |
I've dropped all transitive dependency upgrades now, the revert seems to mostly contain Some |
We'll also need microsoft/windows-rs#3785; having case-insensitive collisions b/w |
231387f
to
ce97257
Compare
Oh noes, cased files on a case-insensitive filesystem. /me shudders in |
Connections
https://github.com/microsoft/windows-rs/releases/tag/0.61.0
https://github.com/microsoft/windows-rs/releases/tag/63
https://github.com/microsoft/windows-rs/releases/tag/69
Description
Uses the latest
windows 0.62
andwindows-core 0.62
releases, including some minor code improvements for us. The MSRV has been bumped to1.74
, butwgpu
is already on1.76
anyway.Testing
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.