godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.61k stars 19.31k forks source link

Vulkan Mobile: 3D rendering is black on Android (only 2D rendering is visible) #73384

Open josefalanga opened 1 year ago

josefalanga commented 1 year ago

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:

clayjohn commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

TomerconDevelopers commented 1 year ago

I think i already posted the same issue in this thread

https://github.com/godotengine/godot/issues/72443

TomerconDevelopers commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Same problems found on Adreno 660; T_T

cybereality commented 1 year ago

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

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

InfernalWAVE commented 1 year ago

Also having this issue on Samsung Galaxy Tab A7 Lite.

This one really threw me for a loop.

cybereality commented 1 year ago

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

ghost commented 1 year ago

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 commented 1 year ago

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

akien-mga commented 1 year ago

Maybe related? #77451

Zireael07 commented 1 year ago

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

Cykyrios commented 1 year ago

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.

Calinou commented 1 year ago

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.

If this only occurs with MSAA enabled, this is a separate issue: https://github.com/godotengine/godot/issues/67204

josefalanga commented 1 year ago

The original happens with MSAA disabled. I haven't tried any 4.1 builds, there should be a fix there?

clayjohn commented 1 year ago

The original happens with MSAA disabled. I haven't tried any 4.1 builds, there should be a fix there?

Its doubtful that this will be fixed in 4.1. On a related note, Bastiaan and I are still working on getting phones with these specs to test on which will allow us to debug further in case no one else steps up to do it.

cybereality commented 1 year ago

I just tested 3 Android tablets, the Samsung Tab S8+ (Adreno 730), Samsung Tab A8 (Mali G52 MP2), and the Leia Lume Pad 2 (Adreno 660) and I was not able to reproduce the issue with the project in the OP. However, I have seen this bug before on two of the tablets (probably about a month ago), so perhaps something changed (OS update, etc.).

josefalanga commented 1 year ago

I'm up to help with the debugging. I can clone your forks, compile the engine, build locally and test/run renderdoc until we hit the nail. I lack the technical knowledge to actually code the solution, I don't have any rendering experience and looks like a very hard topic, I don't even know where to begin to look at to start a PR for this 😅

I know it's a bummer not having the devices yourselves, slows down the process a lot, but that's something I can help on.

josefalanga commented 11 months ago

@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

@BastiaanOlij are you talking about this section of rendering_device_vulkan.cpp?

    if ((p_view_count > 1) && !context->supports_renderpass2()) {
        // This is only required when using vkCreateRenderPass, we add it if vkCreateRenderPass2KHR is not supported
        // resulting this in being passed to our vkCreateRenderPass fallback.

        // Set view masks for each subpass.
        for (uint32_t i = 0; i < subpasses.size(); i++) {
            view_masks.push_back(view_mask);
        }

        render_pass_multiview_create_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO;
        render_pass_multiview_create_info.pNext = nullptr;
        render_pass_multiview_create_info.subpassCount = subpasses.size();
        render_pass_multiview_create_info.pViewMasks = view_masks.ptr();
        render_pass_multiview_create_info.dependencyCount = 0;
        render_pass_multiview_create_info.pViewOffsets = nullptr;
        render_pass_multiview_create_info.correlationMaskCount = 1;
        render_pass_multiview_create_info.pCorrelationMasks = &correlation_mask;

        render_pass_create_info.pNext = &render_pass_multiview_create_info;
    }

If so, I might try (and probably fail) to fix this issue :D

I can do some trial & error pretty fast with the device in hand, point me to any relevant section where I should try stuff.

clayjohn commented 11 months ago

This section contains the fallback for vkCreateRenderpass: https://github.com/godotengine/godot/blob/0c2144da908a8223e188d27ed1d31d8248056c78/drivers/vulkan/vulkan_context.cpp#L81-L168

josefalanga commented 11 months ago

Ok. picture me very confused and surprised, but this now works just fine in the original device I reported (GPU Mali-T830 MP1) with Vulkan. Without any changes to my project.

I tested new builds with 4.1, 4.0, and the old build I did with 4.0 that led to this report, and it.. just works?.

As said in the above comments, something with the device itself changed, but I also haven't updated it in any form or way. It was powered off in a drawer all this time.

I might run RenderDoc again later, to see if I can open the capture now, and will further comment this issue if I find anything worthy of mention. Also I'll try to get the other two devices I tested this to run again.

My issue looks like is now solved, but I'm now wondering WHY this happened in the first place, and how I can prevent it from happening again.

OK

josefalanga commented 11 months ago

Old and new builds are still broken with the Samsung Galaxy A10s (PowerVR GE8320).

Will edit this comment with further information to avoid spamming the issue a lot.

TomerconDevelopers commented 10 months ago

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

hichemfantar commented 9 months ago

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 commented 9 months ago

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 commented 8 months ago

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

Alex2782 commented 7 months ago

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

screenshot ![image](https://github.com/godotengine/godot/assets/41921395/b60ce5a4-288e-439c-b93e-c96aebfe19fd)
AlexAnder1946 commented 6 months ago

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

WorldEnviroment OFF: Screenshot_enviroment_off WorldEnviroment ON: Screenshot_enviroment_on

Alex2782 commented 6 months ago

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. https://github.com/godotengine/godot/pull/84169

AlexAnder1946 commented 6 months ago

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 commented 6 months ago

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

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

Screenshot ![image](https://github.com/godotengine/godot/assets/41921395/0c30aacf-a258-43b3-9fdd-dbc7992f5396)
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 commented 6 months ago

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.

I dont why google Pixel dont support that 🤷

sorry for the delay

warent commented 6 months ago

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!

https://github.com/godotengine/godot/issues/86621

TomerconDevelopers commented 4 months ago

after one year still not fixed this major bug

TomerconDevelopers commented 3 months ago

still nothing changed

TomerconDevelopers commented 3 months ago

Worsen experience with godot

Calinou commented 3 months ago

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

PieceOfHappiness commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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) :slightly_smiling_face: