-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
iOS Mobile Renderer Black Screen #99682
Comments
Can you reproduce this on 4.3.stable? |
I will go check |
I initially tried to test in 4.3 by building from source but was unable to because my Mac OS received an LLVM update. And this version of LLVM can no longer compile code prior to that fix we put in a while back where LLVM rolled out some breaking changes. But I do have good news! I was able to reproduce the issue with dev snapshots and confirm that things work as expected in 4.3-stable. So this is indeed a regression. I'm going to start bisecting, but there is the table of what I have tested so far: ✅ = vulkan mobile works as expected
|
Also note that I reproduced this with normal Godot. It occurred in the 4.4-dev5 snapshot without mono support. And I believe those snapshots do not have double precision either right? Which would lead me to believe this issue is not related to mono support or double precision. |
So it was first introduced somewhere between 4.3.stable and 4.4-dev1. @Calinou I found where it was introduced in regards to snapshots :). |
Default backend for Mobile/Forward+ on macOS and iOS was changed to new Metal renderer. While Vulkan renderer should support A12 (it is the oldest SOC it should run on), I'm not sure what's the minimum requirement for Metal renderer. Try setting |
@bruvzg I will give this a shot @Calinou I bisected and found the PR that introduced this issue. Looks like it @stuartcarnie 's pr here: #88199 Thank you btw @stuartcarnie for the metal support! I love getting as close to the native drivers for target platforms as possible! :). I just believe I may have found an issue with this PR that introduces black screen on ios. |
@bruvzg I can confirm that changing the |
For the reference, Metal render seems to be working fine on A14 (10. gen. iPad) and M4 Pro. Unlike A12, these devices have
Officially supported Metal 3 devices are A12X/A13+, so base A12 might be too old and have incomplete Metal implementation. We probably should update documentation with new min. system requirements for Metal renderer. |
@bruvzg Should we have it automatically fall back to Vulkan if we detect at startup that it is the old one? Also something to note, Forward+ works without issue. I was only having issues with the Mobile renderer |
Yes, but currently fallback only works if a specific renderer is completely missing, in this case renderer init works, but shader compiler fails.
In this case, it probably is a Metal renderer bug, not a hardware limitation. |
I tried the 2D lights and shadows demo, as I already had that setup, and it is still working with the Forward Mobile renderer, but Forward+ is definitely returning a lot of errors, so I don't believe it is working without issue. I'll try your MRP next. |
For some extra info, my phone is:
|
Forward+ is not working correctly, as many of the pipelines are failing to compile, which are in the logs @TCROC included. I was able to replicate that on my iPhone 13. I'll have to take a look and see why it's failing, as I expect it should work. I'm mostly interested in why the mobile renderer isn't working for you, as there are no logs and no errors / warnings suggesting it is even compiling anything. |
Did the MRP work on your iPhone 13 with mobile renderer? |
Just trying that now |
It is reproducible – the issue is in the Metal renderer and related to how SPIRV-Cross generates the shader interface for iOS vs macOS for certain shaders. Turns out that the mobile renderer is also partially rendering (like Forward+), a full-screen quad is rendering black for mobile. |
Perfect! Thank you for reproducing @stuartcarnie! And happy Thanksgiving if you celebrate it! :) I guess we can update the tags now that it has been confirmed :) |
Fix coming via #99820 |
@stuartcarnie I'm not saying you are "the man". But if the "the man" were to hypothetically exist, he would likely look something like you 😎 I'll try out your PR in my fork in the morning! 🔥 |
@TCROC I think I see that you have an Apple5 GPU device (2018), which is unfortunately too low for the change I had to make. The minimum version is now an Apple6 family GPU, which is from 2019. SPIRV-Cross has some issues with mixing Apple GPU features between Apple5 and Apple6 era GPUs, which directly affect the Metal renderer 😔
I'm going to investigate adding support for 2017+ era devices in a separate PR. |
@stuartcarnie Perfect! Let me know what solution you come to and I'll gladly test it out :) Thank you! You are the best! :) |
hi, I trying export on iPhone14 to iOS , and black screen too. Metal. Provisioning in export not working too in 4.4dev-. Must set it / correct on xcode project, error in log when exporting. Editor export not using dev id. Id is correct. in 4.3 stable is ok, works. |
@maxelusgit try changing your rendering driver to vulkan: |
@TCROC thx, yes, on vulkan works 😀 |
@stuartcarnie perfect! I'll try that tomorrow :) |
In my tests... using Metal:
before :
using Volkan :
|
This commit introduces support for checking the argument buffer tier, and falling back to disabling argument buffers when tier 1 is available. Closes godotengine#99682
@maxelusgit do you have a MRP we can look at, as that will help us troubleshoot the problem. It is also likely a separate issue, as an iPhone 14 should be a Tier 2 device and won't use the new code path |
@maxelusgit you should also clear out your Godot |
@stuartcarnie not yet. I had some things come up that I had to deal with. I try to get around to testing before end of week |
Godot Engine mono v4.4.dev7.official.46c8f8c5c - https://godotengine.org exporting to iOS set to use the mobile renderer, it renders with a black screen. like this issue. |
Tested versions
System information
Godot v4.4.dev.mono (f0e9717) - macOS 15.0.1 - Multi-window, 1 monitor - Metal (Forward+) - integrated Apple M2 (Apple8) - Apple M2 (8 threads)
Issue description
When exporting to iOS set to use the mobile renderer, it renders with a black screen:
When exporting to iOS set to use the Forward+ renderer, it renders just fine:
Here are the respective logs:
Note
The Forward+ Renderer Log has many errors, but that is the one that actually renders correctly. The Mobile Renderer log only has 1 error, but renders with a black screen.
Mobile Renderer Log
Forward+ Renderer Log
forward_plus_log.txt
Steps to reproduce
Minimal reproduction project (MRP)
mrp.zip
Edit:
Here's the table of tested snapshots:
✅ =
vulkanmobile works as expected❌ =
vulkanmobile blank screenEdit:
I crossed out
vulkanabove. @bruvzg pointed out here that we are actually defaulting to the metal rendering device on ios now. Changing it back to use Vulkan in the project settings as described in that comment makes the MRP work. So it appears to be specifically related to the metal driver introduced in this pr: #88199The text was updated successfully, but these errors were encountered: