-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Metal: Reduce baked version to MSL 3.1; validate minimum version #110063
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
Conversation
Validate the MSL version of the baked shader is <= the current version supported by the OS, and return an error so it is recompiled. Closes godotengine#109846
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 simple in the end!
CC @TCROC Can you test this and confirm that it fixes the issue for you? |
That was a fast turnaround! I'll merge this into my fork and test it now! 🔥 |
I compiled and uploaded to Test Flight. I should know in a couple of days when Apple approves the release so my iOS 17.6.1 users can test it! :) |
@stuartcarnie @clayjohn Apple approved the release and I just tested. Unfortunately it didn't fix it. It still crashes. One thing to note: debug builds don't crash, its just blank screen. Release builds segfault. Here is a crash report: Click me
I'm going to roll out a release with |
@TCROC can you test on a physical device again? I wonder if the old shader cache got used or something like that. It would be helpful to see if there is still an error reported |
The crash above was from a physical device. From a clean install. Multiple attempted startups. Still waiting on apple to approve the build with shader baker disabled. Then will be able to test both on a physical device. |
That call stack was in your original crash report, and surprised me, as this is happening when the app first opens. This is the first set of draw commands issued by Godot, to display the splash screen. This might be a red herring. The function MDCommandBuffer *cb = (MDCommandBuffer *)(p_cmd_buffer.id);
cb->encode_push_constant_data(p_shader, p_data); The crash is a NULL pointer access at offset
That align with the arguments of the function:
Note
If I look at the first few lines of void MDCommandBuffer::encode_push_constant_data(RDD::ShaderID p_shader, VectorView<uint32_t> p_data) {
switch (type) {
case MDCommandBufferStateType::Render: {
MDRenderShader *shader = (MDRenderShader *)(p_shader.id);
if (shader->push_constants.vert.binding == -1 && shader->push_constants.frag.binding == -1) {
I'm certain the
The offset of the Important Obtaining logs is going to necessary in understanding what is going on. |
Also note that because Metal returned |
Great insights! I'm learning a lot from this debugging as well! What logs would you like me to capture? Anything I can do when plugging the device into a Mac / Xcode that might be useful? Or maybe uploading a build configured with verbose mode? |
@TCROC if you can get verbose logs of the app starting up, that would be great. |
Perfect! I'll push a new build with verbose logs tonight. |
@TCROC Any update on those logs? @stuartcarnie Should this be merged separately, or would we prefer to wait and address the core issue in the same PR? |
Still waiting on Apple approval. This last weekend and today was a US holiday so probably won't be approved until tomorrow. Normally they approve within the day, but this is likely the reason for the delay. |
@Repiteo yes, this could be merged regardless, as it still addresses a potential issue with versioning |
Thanks! |
Validate the MSL version of the baked shader is <= the current version supported by the OS, and return an error so it is recompiled.
ClosesRelated to iOS 17 crash on startup #109846