godotengine / godot

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

Color's from Panel/ColorRect Nodes is not being rendered on Android using Godot 4.3 Beta 3 (old Vulkan 1.0 drivers) #94608

Open kagenay opened 3 months ago

kagenay commented 3 months ago

Tested versions

System information

Device Name: Samsung Galaxy Note 8 - Model Number: SM-N950F - Architecture: arm64 - Renderer: Vulkan

Issue description

The colors from ColorRect Nodes and Panel Nodes are not being rendered on Android (Tested on Samsung Galaxy Note 8).

Godot v4.3 Beta 3 Windows From Editor: image

Godot v4.3 Beta 3 Exported Android Apk: image

Steps to reproduce

(Alternatively you can also install the exported apk in the MRP and test it)

Minimal reproduction project (MRP)

GodotV4.3Beta3-Android-Color-Rendering-Bug.zip

akien-mga commented 3 months ago

I don't seem to reproduce the issue on a Google Pixel 7a (Mali-G710) with 4.3.beta3.

Can you check with adb logcat to see if there are any errors in the logs?

allenwp commented 3 months ago

I have not yet tried building or exporting the MRP myself, but I did load the pre-built AndroidColorRenderingBug.apk onto a Google Pixel Phone and it seems to [edit] not be reproducing the issue:

IMG_4263

Phone information: Model: Pixel Hardware version: PVT Android version: 10 Build number: QP1A.191005.007.A3

clayjohn commented 3 months ago

@allenwp That photo shows that it is not reproducing the issue. Those appear to be the correct colors. The problem is that the user's device is showing up all gray.

Thank you for testing though. I was also going to test on the Pixel 1 as it is a similar age and GPU as the OP's device

allenwp commented 3 months ago

@allenwp That photo shows that it is not reproducing the issue. Those appear to be the correct colors. The problem is that the user's device is showing up all gray.

Thank you for testing though. I was also going to test on the Pixel 1 as it is a similar age and GPU as the OP's device

Hah! Thanks! I'll try out a couple more old devices that I have lying around...

Edit: Sorry, it looks like all my other Android phones are too old for this pre-built APK. They’re all from 2014 era. Might be time to trash them 😅

clayjohn commented 3 months ago

Tested on a Galaxy Note9 on the Firebase test lab and it also appears to be fine

https://github.com/user-attachments/assets/60818b91-d3d4-4bf3-9969-e9b379f6704a

Calinou commented 3 months ago

@kagenay Can you test older 4.3.beta and dev builds to determine when the regression started? You can download them here.

kagenay commented 3 months ago

@kagenay Can you test older 4.3.beta and dev builds to determine when the regression started? You can download them here.

@Calinou sorry for the late reply, so i tested the same MRP on Godot 4.3 dev6 and 4.3 beta 1 and the bug is not reproducible, but it is reproducible on Godot 4.3 beta 2 so i guess now we know where the regression started on.

kagenay commented 3 months ago

I don't seem to reproduce the issue on a Google Pixel 7a (Mali-G710) with 4.3.beta3.

Can you check with adb logcat to see if there are any errors in the logs?

@akien-mga there doesn't seem to be errors related to the problem i have, just normal errors i get from every Godot app i tried on.

image

akien-mga commented 3 months ago

CC @Alex2782 as you might be interested in this kind of "Android GPU issue that happens only on some drivers" bug ;)

Based on https://www.gsmarena.com/samsung_galaxy_note8-8505.php#n950f, this device seems to have a Mali-G71 MP20 GPU. Worth noting that the USA version of the Note 8 has Adreno 540 instead, so here I went by the model number mentioned in the OP: SM-N950F.

@kagenay Since you're the only one able to reproduce this so far, it might be useful if you were able to bisect the regression. This is a bit tedious and implies compiling the engine for Android yourself on a handful of commits (likely 8-9) to see what's the first commit that introduced the issue. See documentation on Compiling for Android.

If you're able to do that, you'd have to bisect between a4f2ea91a1bd18f70a43ff4c1377db49b56bc3f0 (4.3.beta1, git bisect good) and b75f0485ba15951b87f1d9a2d8dd0fcd55e178e4 (4.3.beta2, git bisect bad).

As this implies exporting the project to Android each time, I would suggest:

Alex2782 commented 3 months ago

@kagenay please try: ShaderTest.zip

At the bottom left some system information is displayed, GPU and Vulkan API version can also help to narrow down the issues.

Screenshot ![Bildschirmfoto 2024-07-24 um 16 40 29](https://github.com/user-attachments/assets/44bee43c-32e4-49ab-ac78-3dba852ce948)

or you could try to integrate this Control scene into your MRP Bildschirmfoto 2024-07-24 um 17 19 05


I only own Adreno 3xx, 4xx, 6xx and Samsung Tab A6 (2016) Mali-T830 (no issue with 4.3-beta3)

Physical devices on Firebase Test Lab (@clayjohn perhaps also useful for you): https://docs.google.com/spreadsheets/d/1j9bY9niDVIduzoZ80xWOpMEcKBlXF6RL316njQNzaKw

kagenay commented 3 months ago

@kagenay please try: ShaderTest.zip

here (did no modifications to the project and tested with godot 4.3 beta 2): image

looks like sprites in CanvasGroup and particles aren't being rendered either

kagenay commented 3 months ago

@kagenay Since you're the only one able to reproduce this so far, it might be useful if you were able to bisect the regression. This is a bit tedious and implies compiling the engine for Android yourself on a handful of commits (likely 8-9) to see what's the first commit that introduced the issue. See documentation on Compiling for Android.

Hm okay I'll try this in a few days and let you know

Alex2782 commented 3 months ago

MRP + ShaderTest: I could not reproduce the issues on Mali-G52 to Mali-G72 GPUs, Vulkan API 1.1.xx or 1.3.xx. (Android 10 - 14)

Maybe less Very Bad - Release Blocker? I think only with Vulkan 1.0.x (old driver / Android 8 and 9?)

On Firebase Mate 9, Huawei - Mali-G71 - Android 7, Vulkan is not possible:

vkEnumerateInstanceVersion not available, assuming Vulkan 1.0. USER ERROR: Failed to initialize driver for device.

another CanvasGroup issue on Adreno 630 + Vulkan 1.0.x API / Android 8 ---------------------- On Galaxy S9 - Android 8 (Firebase) - beta1 and beta2 https://github.com/user-attachments/assets/a5358c71-ce44-4f67-bcb4-9f57ca443372 ![image](https://github.com/user-attachments/assets/87735a1e-1e42-40bb-a547-5ff6a2c36f37)
kagenay commented 1 month ago

CC @Alex2782 as you might be interested in this kind of "Android GPU issue that happens only on some drivers" bug ;)

Based on https://www.gsmarena.com/samsung_galaxy_note8-8505.php#n950f, this device seems to have a Mali-G71 MP20 GPU. Worth noting that the USA version of the Note 8 has Adreno 540 instead, so here I went by the model number mentioned in the OP: SM-N950F.

@kagenay Since you're the only one able to reproduce this so far, it might be useful if you were able to bisect the regression. This is a bit tedious and implies compiling the engine for Android yourself on a handful of commits (likely 8-9) to see what's the first commit that introduced the issue. See documentation on Compiling for Android.

If you're able to do that, you'd have to bisect between a4f2ea9 (4.3.beta1, git bisect good) and b75f048 (4.3.beta2, git bisect bad).

As this implies exporting the project to Android each time, I would suggest:

  • Use the Godot 4.3.beta2 version of the Windows editor to do the exports. It should hopefully be compatible with slightly older commits so you can export the self-built template.
  • Start a git bisect, and build the export template with
scons p=android target=template_debug scu_build=yes
# `scu_build` makes the build faster)
cd platform\android\java
.\gradlew.bat generateGodotTemplates
  • You should get an apk in the bin folder. Use that as "Custom Debug Template" in the export preset for Android, and that should let you export (don't enable "Use Custom Build", which requires a different setup).

@akien-mga found it, the issue started on f20e21a

Screenshot 2024-09-21 171922