Skip to content
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

Open
josefalanga opened this issue Feb 15, 2023 · 52 comments

Comments

@josefalanga
Copy link
Contributor

josefalanga commented Feb 15, 2023


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)
ok

This is how it looks in the device
black

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:

  • Samsung SM-M105M, GPU Mali-T830 MP1
  • Samsung SM-A045M, GPU PowerVR GE8320 MP2
  • Samsung Galaxy A01, Adreno 505
@clayjohn
Copy link
Member

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?

CC @BastiaanOlij

@josefalanga
Copy link
Contributor Author

josefalanga commented Feb 15, 2023

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.

@clayjohn
Copy link
Member

Never done that before, but sure, let's take a look. I'll try with Android GPU Inspector. What should I look for?

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).

@josefalanga
Copy link
Contributor Author

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?

@clayjohn
Copy link
Member

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 upside_down_face

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

@josefalanga
Copy link
Contributor Author

josefalanga commented Feb 18, 2023

Meanwhile, the mantainer of RenderDoc dropped me something interesting about the failure to open the capture.

This capture contains invalid use of Vulkan. There is a renderpass being created with one color attachment where the VkAttachmentReference contains a value of attachment = 3806161832 which is not a valid value. This causes an invalid index and then a crash while loading which leads to the disconnect.
I would recommend running your program with the validation layers (I'm not sure how/if that's possible on android but I assume so) to catch errors like this, as RenderDoc does not handle invalid API use.

I will update if I have any luck with Graphics Analyzer.

@clayjohn
Copy link
Member

@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.

CC @BastiaanOlij

@BastiaanOlij
Copy link
Contributor

@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

@josefalanga
Copy link
Contributor Author

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.

@josefalanga
Copy link
Contributor Author

Found another device that reproduces the issue. Samsung SM-A045M with GPU PowerVR GE8320 MP2, that also supposedly supports vulkan.

@TomerconDevelopers
Copy link

I think i already posted the same issue in this thread

#72443

@TomerconDevelopers
Copy link

This device also have same problem
Screenshot_2023-03-09-20-09-47-19_c42fd5307ad0c723935554bc80c21421.jpg

Screenshot_2023-03-09-20-10-15-09_c42fd5307ad0c723935554bc80c21421.jpg

@josefalanga
Copy link
Contributor Author

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.

@DocMine
Copy link

DocMine commented Apr 13, 2023

Same problems found on Adreno 660; T_T

@cybereality
Copy link
Contributor

I also have this issue on the Leia Lume Pad 2 (Adreno 660)

https://support.leiainc.com/lume-pad-2/device/technical-specs

@Calinou Calinou changed the title Black screen on Android 10 Vulkan Vulkan Mobile: 3D rendering is black on Android (only 2D rendering is visible) Apr 27, 2023
@InfernalWAVE
Copy link

Also having this issue on Samsung Galaxy Tab A7 Lite.

This one really threw me for a loop.

@cybereality
Copy link
Contributor

It's now working for me fine on the Godot 4.1 dev 2 build. Adreno 660.

@ghost
Copy link

ghost commented May 14, 2023

Same issue here on Samsung Galaxy A03s (Samsung SM-A037F, PowerVR Rogue GE8320), Godot 4.0.2.
Not working with Godot 4.1 dev 2 as well, just to confirm.

@cybereality
Copy link
Contributor

I found something interesting. The rendering works if you disable anti-aliasing. At least on the Adreno 660.

@akien-mga
Copy link
Member

Maybe related? #77451

@Zireael07
Copy link
Contributor

Hmm - if the finding above turns out to be the key, then mobile Godot should disable antialiasing by default.

@Cykyrios
Copy link
Contributor

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.

@TomerconDevelopers
Copy link

Still not get fixed in oppo a57,
Even after disabled msaa
4.1.1 stable

@hichemfantar
Copy link

hichemfantar commented Sep 18, 2023

Same behavior on my OnePlus.
Complete black screen, on all modes; forward, mobile, compatibility,...
Device: OnePlus Nord N100
268771254-0209b74b-c099-4809-a4d4-30863b9b327b (Custom)

@prfiredragon
Copy link

prfiredragon commented Sep 30, 2023

testing on a Samsung Galaxy A12 work on gl_compatibility.
image

image

With Black Screen

09-30 18:20:39.119  1287 18640 W ziparchive: Unable to open '/data/app/~~lRHyV6CYGDuvZYxcTPXycQ==/org.godotengine.client-bDFcm55xYDH1V8nQdIjbfQ==/base.dm': No such file or directory
09-30 18:20:39.123  1287 18640 I PackageDexOptimizer: Running dexopt (dexoptNeeded=1) on: /data/app/~~lRHyV6CYGDuvZYxcTPXycQ==/org.godotengine.client-bDFcm55xYDH1V8nQdIjbfQ==/base.apk pkg=org.godotengine.client isa=arm64 dexoptFlags=boot_complete,debuggable,public,enable_hidden_api_checks targetFilter=verify oatDir=null classLoaderContext=PCL[]{} async=false
09-30 18:20:39.330  1117  1117 I dex2oat32: /apex/com.android.art/bin/dex2oat32 --input-vdex-fd=-1 --output-vdex-fd=10 --classpath-dir=/data/app/~~lRHyV6CYGDuvZYxcTPXycQ==/org.godotengine.client-bDFcm55xYDH1V8nQdIjbfQ== --class-loader-context=PCL[]{} --compiler-filter=verify --compilation-reason=adcp --max-image-block-size=524288 --resolve-startup-const-strings=true --debuggable --generate-mini-debug-info -j6
09-30 18:20:47.217   711   711 D SurfaceFlinger:      DEVICE | 0xb400007dfa295aa0 | 0102 | RGBA_8888    |    0.0    0.0 1600.0  720.0 |    0    0  720 1600 | SurfaceView - org.godotengine.client[...]dot.game.GodotApp@d74968c@0(BLAST)#0
09-30 18:20:48.218   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=60.03 dur=1016.23 max=20.53 min=10.48
09-30 18:20:49.235   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=59.97 dur=1017.21 max=17.37 min=15.55
09-30 18:20:50.250   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=60.08 dur=1015.26 max=17.72 min=15.14
09-30 18:20:51.267   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=60.02 dur=1016.37 max=17.87 min=15.52
09-30 18:20:54.231   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=4.39 dur=2964.04 max=2764.90 min=15.87
09-30 18:20:55.778   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.29 dur=1547.61 max=1531.70 min=15.91
09-30 18:20:56.862   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.92 dur=1083.46 max=1083.46 min=1083.46
09-30 18:20:58.277   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1415.67 max=1415.67 min=1415.67
09-30 18:20:59.694   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1416.14 max=1416.14 min=1416.14
09-30 18:21:01.459   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.70 dur=1765.09 max=1049.05 min=33.17
09-30 18:21:03.907   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.82 dur=2448.36 max=1765.61 min=682.75
09-30 18:21:05.306   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1398.88 max=1398.88 min=1398.88
09-30 18:21:06.689   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.45 dur=1382.97 max=699.95 min=683.02
09-30 18:21:07.838   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.74 dur=1149.00 max=1132.99 min=16.00
09-30 18:21:09.287   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.38 dur=1448.72 max=765.93 min=682.79
09-30 18:21:10.106  1287  1322 D WindowManager: rotationForOrientation, orientationSource=ActivityRecord{5174204 u0 org.godotengine.client/com.godot.game.GodotApp t688}
09-30 18:21:11.052   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.57 dur=1764.98 max=1764.98 min=1764.98
09-30 18:21:11.722  1287  1322 D WindowManager: rotationForOrientation, orientationSource=ActivityRecord{5174204 u0 org.godotengine.client/com.godot.game.GodotApp t688}
09-30 18:21:13.500   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.82 dur=2448.32 max=1765.12 min=683.20
09-30 18:21:14.916   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1415.90 max=1415.90 min=1415.90
09-30 18:21:16.631   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.58 dur=1715.42 max=1715.42 min=1715.42
09-30 18:21:18.380   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.57 dur=1748.60 max=1748.60 min=1748.60
09-30 18:21:19.429   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.95 dur=1049.38 max=1049.38 min=1049.38
09-30 18:21:20.828   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1399.19 max=1399.19 min=1399.19
09-30 18:21:23.226   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.83 dur=2398.09 max=1398.60 min=999.49
09-30 18:21:25.325   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.95 dur=2098.72 max=1416.08 min=682.64
09-30 18:21:27.040   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.58 dur=1715.27 max=1715.27 min=1715.27
09-30 18:21:28.757   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.17 dur=1716.10 max=1032.86 min=683.23
09-30 18:21:30.905   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.47 dur=2148.65 max=2148.65 min=2148.65
09-30 18:21:32.304   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.72 dur=1398.58 max=1398.58 min=1398.58
09-30 18:21:34.019   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.17 dur=1715.11 max=1032.35 min=682.75
09-30 18:21:35.434   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1415.37 max=1415.37 min=1415.37
09-30 18:21:37.166   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.15 dur=1732.18 max=1265.73 min=466.45
09-30 18:21:38.583   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1416.04 max=1416.04 min=1416.04
09-30 18:21:41.031   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.82 dur=2448.52 max=1766.03 min=682.49
09-30 18:21:42.513   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=1.35 dur=1482.13 max=999.08 min=483.05
09-30 18:21:43.929   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dd5aed948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=0.71 dur=1415.73 max=1415.73 min=14

With Gl_compatibility working

09-30 18:25:32.204  1287 18640 I PkgPredictorService-IpmAdcpController:  start a thread to run dex2oat task for pkg:org.godotengine.client
09-30 18:25:32.206  1287 18640 W ziparchive: Unable to open '/data/app/~~nJgLvNx8rbqv9Iv3PgcMXw==/org.godotengine.client-e9QVyqzaVTX42K_fonijLQ==/base.dm': No such file or directory
09-30 18:25:32.208  1287 18640 I PackageDexOptimizer: Running dexopt (dexoptNeeded=1) on: /data/app/~~nJgLvNx8rbqv9Iv3PgcMXw==/org.godotengine.client-e9QVyqzaVTX42K_fonijLQ==/base.apk pkg=org.godotengine.client isa=arm64 dexoptFlags=boot_complete,debuggable,public,enable_hidden_api_checks targetFilter=verify oatDir=null classLoaderContext=PCL[]{} async=false
09-30 18:25:32.428  3215  3215 I dex2oat32: /apex/com.android.art/bin/dex2oat32 --input-vdex-fd=-1 --output-vdex-fd=10 --classpath-dir=/data/app/~~nJgLvNx8rbqv9Iv3PgcMXw==/org.godotengine.client-e9QVyqzaVTX42K_fonijLQ== --class-loader-context=PCL[]{} --compiler-filter=verify --compilation-reason=adcp --max-image-block-size=524288 --resolve-startup-const-strings=true --debuggable --generate-mini-debug-info -j6
09-30 18:25:32.740   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=40.68 dur=1032.48 max=34.16 min=16.06
09-30 18:25:33.773   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.63 dur=1032.87 max=33.69 min=16.38
09-30 18:25:34.756  1287  2717 D PkgPredictorService-IpmNapPreloadController: app:0_&_com.android.chrome die, remove from <launchTime:2023-09-30 18:25:24 hour:18 day:7 previous:[org.godotengine.client, org.godotengine.client, org.godotengine.client] running:org.godotengine.client/com.godot.game.GodotApp apkVersion:1.0 userId:0 screenOrientation:2 wifi:3 bt:12 predictTime:2 launching Time:10050 predicted:true prediction:[0_&_com.android.chrome, 0_&_com.android.settings, 0_&_org.godotengine.client] preloaded:false preloading:[0_&_com.android.chrome, 0_&_com.android.settings]>
09-30 18:25:34.789   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.33 dur=1016.25 max=33.94 min=15.87
09-30 18:25:35.822   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.65 dur=1032.32 max=33.80 min=15.98
09-30 18:25:36.837   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.34 dur=1015.85 max=34.36 min=15.89
09-30 18:25:37.870   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.64 dur=1032.75 max=33.70 min=16.00
09-30 18:25:38.886   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.36 dur=1015.53 max=34.02 min=15.98
09-30 18:25:39.918   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.64 dur=1032.68 max=34.27 min=15.74
09-30 18:25:40.935   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.33 dur=1016.21 max=33.87 min=16.13
09-30 18:25:41.951   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.33 dur=1016.16 max=33.96 min=16.06
09-30 18:25:42.983   711   711 I BufferQueueProducer: [SurfaceView - org.godotengine.client/com.godot.game.GodotApp@d74968c@0(BLAST)#0](this:0xb400007dda2b6948,id:-1,api:0,p:-1,c:711) queueBuffer: fps=41.66 dur=1032.28 max=33.84 min=16.

image

@mahdisml
Copy link

try Godot 4.2 beta 3 , it may have been fixed .

@Alex2782
Copy link
Contributor

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

AGI supported devices: https://developer.android.com/agi/supported-devices

I own a Pixel 4a. When I checked the issue with mesh buffers / HOST_COHERENT_BIT a few weeks ago, I was able to run the AGI demo and 'frame profiler'. But with Godot apps it didn't work, I think there are conflicts with the 'VMA' lib. The Godot app crashed too early, the AGI app could not collect data.


my tests: RenderTest.zip

  • v4.2.rc1.official [ad72de5]
  • not reproducible on Pixel 4a and Samsung Tab S7 (SM-T870)
  • but 3d/lights_and_shadows demo, this project does not work (UI visible, background is black.)
screenshot

image

@AlexAnder1946
Copy link

Hello, I have the same problem.

  • Device: Google Pixel 8.
  • Godot version: v4.2.1 (lastest at today)
  • renderer: Mobile
  • devolp in Ubuntu 22.04

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.
I tested this problem with a demo project almost empty, with only the 3D scene with WorldEnviroment ON and other with WorldEnviroment OFF.

  • MSAA disabe
  • only using primitives

WorldEnviroment OFF:
Screenshot_enviroment_off
WorldEnviroment ON:
Screenshot_enviroment_on

@Alex2782
Copy link
Contributor

https://godotengine.org/article/dev-snapshot-godot-4-3-dev-1/
@AlexAnder1946 Can you also test this version?

MSAA problems have probably already been fixed.
#84169

@AlexAnder1946
Copy link

https://godotengine.org/article/dev-snapshot-godot-4-3-dev-1/ @AlexAnder1946 Can you also test this version?

MSAA problems have probably already been fixed. #84169

same result with version with Godot 4.3-dev1.
WorldEnviroment ON -> not rendering 3D
WorldEnviroment OFF -> rendering normaly

@Alex2782
Copy link
Contributor

Alex2782 commented Dec 26, 2023

I have tried your test project, no errors on a Samsung Tab S7.
No MSAA problem, v4.2.1.stable.official [b09f793]

Could you reset the 'WorldEnvironment' configuration, will it work then? (without glow, etc.)

Screenshot

image

reset tonemap_mode
reset glow_enabled
reset sky
reset background_mode

It's unusual for a modern smartphone like the Pixel 8 to have problems with this.
Comparing report on vulkan.gpuinfo.org

@AlexAnder1946
Copy link

Could you reset the 'WorldEnvironment' configuration, will it work then? (without glow, etc.)
Screenshot

reset tonemap_mode
reset glow_enabled
reset sky
reset background_mode

Works with Glow/glow_enable set to false in the WorldEnviroment resources.

  • Tonemap: ✅
  • SSR: ✅
  • SSIL: ✅
  • Fog: ✅
  • Glow: ❌
  • Adjustment: ✅

I dont why google Pixel dont support that 🤷

sorry for the delay

@warent
Copy link

warent commented Dec 30, 2023

Could you reset the 'WorldEnvironment' configuration, will it work then? (without glow, etc.)
Screenshot

reset tonemap_mode
reset glow_enabled
reset sky
reset background_mode

Works with Glow/glow_enable set to false in the WorldEnviroment resources.

* Tonemap: ✅

* SSR:  ✅

* SSIL:  ✅

* Fog: ✅

* **Glow**: ❌

* Adjustment:  ✅

I dont why google Pixel dont support that 🤷

sorry for the delay

I just reported the same thing!

#86621

@TomerconDevelopers

This comment was marked as duplicate.

@TomerconDevelopers

This comment was marked as spam.

@TomerconDevelopers

This comment was marked as spam.

@Calinou
Copy link
Member

Calinou commented Apr 4, 2024

@TomerconDevelopers Please stop bumping the issue without contributing new information, or you may be blocked from participating in this repository.

@PieceOfHappiness
Copy link

Hello, have you found a solution to support vulkan?

Observation:
When you turn on shadows in the light settings. There is no light at all, except for the meizu 15 lite device, the application crashes without messages. And Huawei p40 lite devices, the image is displayed correctly and there are shadows.

Full Enable

When shadows are disabled, the application works correctly, with the exception of meizu 15 lite, the application displays a completely gray screen.

Full disable

system used
Godot Engine v4.2.2.stable.official.15073afe3
Vulkan API 1.3.260 - Forward Mobile - Using Vulkan AMD - Radeon RX 580 Series

Tested devices:

Meizu 15 lite
qualcomm snapdragon 626
adreno 506
vulkan API 1.0

huawei p40 lite
HiSilicon Kirin 810
Mali-G52 MP6
vulkan 1.0

bluestack 5.13.215
device profiler samsung galaxy s20 ultra
android 9.0
graphics rendering vulkan

android studio 2023.3.1
android emulator device (AVD) 34.2.13
google pixel API 31 Android 12

@Calinou
Copy link
Member

Calinou commented May 21, 2024

Devices that only have Vulkan 1.0 support in their drivers generally have broken Vulkan support. I recommend using the Compatibility rendering method instead.

@PieceOfHappiness
Copy link

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.

@Calinou
Copy link
Member

Calinou commented May 24, 2024

but this does not explain the behavior of the emulators

Unfortunately, hardware-accelerated graphics APIs in emulators tend to not be very reliable either.

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.

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) 🙂

@Alex2782
Copy link
Contributor

Alex2782 commented Jun 7, 2024

@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
Zipfile, 50 MB Download on Google Drive (Master Branch + PR #92817)

screenshots

Bildschirmfoto 2024-06-07 um 20 03 14

Bildschirmfoto 2024-06-07 um 20 04 31


Update:

  • Galaxy A12, Android API 31, PowerVR Rogue GE8320, Vulkan API 1.1.131
  • Galaxy A03s, Android API 33, PowerVR Rogue GE8320, Vulkan API 1.1.177

PR #92817 does not fix the bugs on PowerVR Rogue GPUs
image

@josefalanga
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: For team assessment
Status: For team assessment
Development

No branches or pull requests