-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Vulkan Mobile: 3D rendering is black on Android (only 2D rendering is visible) #73384
Comments
This is very interesting. I am looking at the Vulkan capabilities of another similar device (also with a Mali - T830) and it appears it should have everything you need to run the Vulkan renderer (including 3D). https://vulkan.gpuinfo.org/displayreport.php?id=16133#device. So there must be a feature or extension that we are relying on without realizing it. How comfortable are you with debugging? Would you be comfortable using a tool like Renderdoc or the Android GPU Inspector to take a deeper look? |
Never done that before, but sure, let's take a look. I'll try with Android GPU Inspector. What should I look for? Nevermind, I'll try renderdoc, AGI says it's incompatible with the device. |
You'll want to use the tool to capture a frame (one of two options when you open the tool if i remember correctly). This will bring you to the frame profiler https://developer.android.com/agi/frame-trace/frame-profiler In the frame profiler there is a commands pane which lists all the Vulkan commands that have been sent to the GPU. Basically I want to see if there are Vulkan commands issued for the cube and sky A command will looks something like this: (taken from the AGI website) This will help us narrow down whether the issue is with our use of Vulkan (the command doesn't get sent). Or if something is going wrong during rendering (the command is sent, but it results in nothing being drawn). |
Well, I tried with Android GPU Inspector, the device isn't supported. Also tried with RenderDoc, looks like I've run into a bug. I can capture a frame, but can't open it to examine the commands. Works as expected with my other device, so I'm filing a bug report to RenderDoc itself 🙃 Any other tool I can use to get the commands? |
There is also ARM Graphics Analyzer, which may be better support as you have a Mali device but I have no experience with it https://developer.arm.com/Tools%20and%20Software/Graphics%20Analyzer |
Meanwhile, the mantainer of RenderDoc dropped me something interesting about the failure to open the capture.
I will update if I have any luck with Graphics Analyzer. |
@josefalanga No need to investigate further. That information is enough to tell me where the issue is coming from. From Baldurk's response it sounds like something is broken either in creating the RenderPass attachment or perhaps even in creating the Framebuffer. At any rate, it gives us a direction to look. I don't think Graphics Analyzer will help us narrow things down any further. |
@clayjohn Interesting, to me my immediate thought goes to the work we did to add backwards compatibility support if RenderPass2 isn't available. Maybe there is something wrong in that code path when it sets up the alternative structure? I'm not sure how best we can test that |
I'm available to test/debug any build you send. It will kinda suck for you because the black box nature of that method, but I'm ready to help however I can. |
Found another device that reproduces the issue. Samsung SM-A045M with GPU PowerVR GE8320 MP2, that also supposedly supports vulkan. |
I think i already posted the same issue in this thread |
Adreno 505 looks like has problems too. Another Samsung, this time the Galaxy A01 runs into the same issue. I'm editing the original post to include a list of GPUs to test this. |
Same problems found on Adreno 660; T_T |
I also have this issue on the Leia Lume Pad 2 (Adreno 660) https://support.leiainc.com/lume-pad-2/device/technical-specs |
Also having this issue on Samsung Galaxy Tab A7 Lite. This one really threw me for a loop. |
It's now working for me fine on the Godot 4.1 dev 2 build. Adreno 660. |
Same issue here on Samsung Galaxy A03s (Samsung SM-A037F, PowerVR Rogue GE8320), Godot 4.0.2. |
I found something interesting. The rendering works if you disable anti-aliasing. At least on the Adreno 660. |
Maybe related? #77451 |
Hmm - if the finding above turns out to be the key, then mobile Godot should disable antialiasing by default. |
This is also true on my Zenfone 8 (Adreno 660 as well), rendering works again after disabling MSAA. Activating FXAA or TAA doesn't break rendering, although I believe they might not be properly supported on mobile. |
Still not get fixed in oppo a57, |
try Godot 4.2 beta 3 , it may have been fixed . |
AGI supported devices: https://developer.android.com/agi/supported-devices I own a Pixel 4a. When I checked the issue with my tests: RenderTest.zip
|
Hello, I have the same problem.
I don't know if it will be useful, but it not happen if remove the WorldEnvironment node from the scene. The problem of not rendering occurs only when using an environment resource, either through a WorldEnvironment node, or using a default one from the file system.
|
https://godotengine.org/article/dev-snapshot-godot-4-3-dev-1/
|
same result with version with Godot 4.3-dev1. |
I have tried your test project, no errors on a Samsung Tab S7. Could you
It's unusual for a modern smartphone like the Pixel 8 to have problems with this. |
Works with
I dont why google Pixel dont support that 🤷 sorry for the delay |
I just reported the same thing! |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@TomerconDevelopers Please stop bumping the issue without contributing new information, or you may be blocked from participating in this repository. |
Hello, have you found a solution to support vulkan? Observation: When shadows are disabled, the application works correctly, with the exception of meizu 15 lite, the application displays a completely gray screen. system used Tested devices: Meizu 15 lite huawei p40 lite bluestack 5.13.215 android studio 2023.3.1 |
Devices that only have Vulkan 1.0 support in their drivers generally have broken Vulkan support. I recommend using the Compatibility rendering method instead. |
Let's say you're right and the manufacturers' statement about Vulcan support may be a lie, but this does not explain the behavior of the emulators In addition, Vulkan has important features to support baked lighting, which is not available in compatibility mode, and this greatly affects the appearance of the application and its performance. |
Unfortunately, hardware-accelerated graphics APIs in emulators tend to not be very reliable either.
Baked lightmaps can both be baked and rendered when using the Compatibility rendering method since 4.3. (For baking, your device needs to support Vulkan, but it's not required for rendering lightmaps.) You can test this in 4.3.dev6 (make a backup of your project before upgrading) 🙂 |
@josefalanga: Can you still reproduce it on your devices? Please use Godot 4.3 Beta 1 and custom template (see screenshots) debug-4.3-beta1.glsl_fix.apk Update:
PR #92817 does not fix the bugs on |
Sorry for the delay. I have no access to these devices anymore. Most just broke, got stolen or were replaced. My own device doesn't reproduce this anymore either. |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version
4.0-rc2
System information
Android 10 armeabi-v7a, Samsung SM-M105M, GPU Mali-T830 MP1, Vulkan
Issue description
I get a black screen for anything 3D in the scene in the given device.
This is how it's supposed to look (screenshot from another device)
This is how it looks in the device
Notice the 2D elements rendering fine, it's only the 3D stuff missing.
Using
gl_compatibility
as a renderer works, it's just an issue with Vulkan.I understand the GPU should support vulkan just fine.
Relevant logcat: render-test-logcat.txt
Steps to reproduce
Exporting and installing the reproduction project in a device with this characteristics is enough.
Minimal reproduction project
The project comes with what logcat had for a simple run.
RenderTest.zip
Devices and GPUs this can be reproduced on:
The text was updated successfully, but these errors were encountered: