-
Notifications
You must be signed in to change notification settings - Fork 1k
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
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! |
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-metal
and 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 test
to run tests.CHANGELOG.md
. See simple instructions inside file.