Add layer observer based on raw-window-metal#7026
Conversation
b1d22cd to
120457c
Compare
|
The changes look fine to me but it would be nice to get some confirmation from original reporters that this indeed fixes their issues. cc @polina4096 & I will leave a comment in bevyengine/bevy#16604 as well. |
|
I would love to test this but just a normal bevy example ( just to make sure i have not missed a crate, these are the ones i patched: |
|
That is a new restriction for binding arrays added in #6811. You could try an example that doesn't use binding arrays or find a way to turn off binding array usage. @cwfitzgerald - I doubt the new restriction will be a blocker for bevy - but putting it on your radar just in case. |
|
Yeah I'll let them know about it |
|
If no one has tested this by next maintainers meeting, we'll merge it. |
|
I've tested that this PR works by cherry picking on top of |
|
Amazing! Thank you! |
|
Unfortunately the latest version still suffers from the resize delay :\ |
|
Something in 24.0.3 after this change has broken rotation again; switching back to this PR fixes the problem. |
I don't see this in the 24 branch, I don't think it was released as part of a patch |
|
Yeah I don't think this was ever backported. I would accept a backport if someone wrote one. |
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-Authored-By: Connor Fitzgerald <connorwadefitzgerald@gmail.com> Co-Authored-By: Mads Marquart <mads@marquart.dk>
|
here is a back port on the v24: #7466 |
Co-authored-by: Mads Marquart <mads@marquart.dk> Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
After #6107, resizing is still broken, and the right way to fix it is to create a sublayer that resizes itself based on the superlayer using key-value observing (see this for an introduction).
I have written a crate for this already, called
raw-window-metaland filed #6210, but that crate depends onobjc2, which is still under review by Firefox/Mozilla. So in the meantime, let's fix this directly in Wgpu.Fixes #7011 and a few other issues, and should be fairly cleanly backport-able to v23 or v24 if desired.
I didn't write all that much documentation and safety comments here, and was kinda sloppy in some places, because the hope is that this fix will be temporary.
Testing
Tested by cherry-picking onto v23.1.0, and running Bevy's mobile example in the iOS simulator.
Checklist
cargo fmt.taplo format.cargo clippy.cargo xtask testto run tests.CHANGELOG.md. See simple instructions inside file.