-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Godot 4.2.1 Compatibility Rendering (GLES3) don't works at all on a 3 Years Old Andoid Device #86112
Comments
I don't think this is something that can be fixed, it's likely your device is indeed missing some feature the Compatibility renderer uses - I believe it uses some features of GLES 3.1 in addition to 3.0 |
Did you properly export with the compatibility renderer? Just selecting it in the editor isn't enough, you need to set this setting: |
OK, just done but same result, this is the debug output:
And now? |
Are you sure, how I can check it to be sure? |
I'd suggest asking these questions in the other community channels first, likely your hardware is too old to support Godot |
But is a 10" Tablet buy on 2020, only 3 years old!!! :( ... and on Godot 3.5.3 GLES2 all works fine. |
It does use OpenGL ES 3.0, don't know why your hardware doesn't work, not necessarily too old but too low support, just because it's only ~4 years old doesn't mean it's capable, and 3.5 GLES2 is different here Edit: My bad only linux uses it, unsure why not on Android 🙂 |
OK, I'll be happy to can help to identify the problem just to be sure if exists the possibility to improve the Compatibility render, only this. Can you simple point me in the right direction to debug it, please? Thanks. |
I'd ask in the channels 🙂, to see if this is an issue or insufficient support |
Thank you very much. |
Indeed the android port does not seem to support OpenGL ES 3.0 from the settings, so likely you have to have OpenGL 3.3, meaning your hardware isn't supported |
No that's a misunderstanding. OpenGL and OpenGL ES have different versioning. We use OpenGL 3.3 on desktop, and OpenGL ES 3.0 on mobile. That being said, older Android devices tend to claim support for OpenGL ES 3.0, but the drivers are so old and buggy that it doesn't work in practice. It may have passed basic compliance tests, but doesn't actually support anything non trivial being made with it. This is hard to detect and thus to prevent from the engine side, we just know that the OS claims to support OpenGL ES 3.0. |
Indeed, the naming and settings are confusing and overrode my initial assumption |
The tablet may be only 3 years old, but its GPU (Adreno 308) was announced in February 2016. This makes it almost 8 years old as of writing. Low-end devices often feature old SoCs as they get cheaper to manufacture over time, and they can sometimes be very old like in your case. This is why an used flagship device is often a better choice than a new low-end device - their SoC won't be the latest, but it'll still be the greatest it was back then. |
OK but I don't understand why the game freeze an the GLES3 initialization, no one frame is showed in GLES3, so I suppose I can investigate a bit more just to be sure what is the problem, at least to understand why Godot isn't able at least to enter in GLES3 modality. Can you instruct me about the right direction to follow to debug it, please? |
I think we can take a step back and figure this out. There are a few things that we should clear up. But first some background:
We need a bit more information from @joined72:
|
I just tested the game on Godot 3.5.3 GLES3, ... same results! :(
Here: GLES3_Test.zip
This is the
The second log line seems to indicate a problem in initializing the GLES3 render.
The exception seems to be raised from the following code ( File: Method: Source Code: 194 godotContainerLayout = godot.onInitRenderView(this);
195 if (godotContainerLayout == null) {
196 throw new IllegalStateException("Unable to initialize engine render view"); // <=== ERROR IS HERE!!!
197 } Let me know if I can do ANYTHING to can help more, thanks. |
Hello. OpenGL 3.3 stopped working for me. "Godot Engine v4.1.3.stable.official.f06b6836a - https://godotengine.org Godot 4.2 / 4.2.1 |
Same results as GLES2, or same results as 4.2.1? Are you saying that 3.5.3 GLES3 does not work on your device?
This is very helpful. This shows that the engine is failing to initialize OpenGL ES 3.0 on your device. This can mean two things:
Given that those benchmarks ran on your device, I am leaning towards it being 2 Your investigation has been very helpful so far, thank you. |
The Godot 3.x GLES3 never run on my devices (I just tested from 3.2.x in 2020 year).
Yes, it is.
Glad to can help, tell me how can I help more, thanks. |
Can I suggest to take inspiration from the Godot 3.5.3 GLES2 initialization to make the required changes to the Godot 4.2.1 Compatibility GLES3 initialization? |
@f9x0 This is an unrelated issue, and is expected behavior since Godot 4.2. ANGLE is used on old AMD GPUs on Windows because their OpenGL drivers are buggy, so ANGLE is being used to translate OpenGL to Direct3D (since these drivers are much more mature on AMD on Windows). |
Through further investigation I discover that until the Godot 3.2 RC1, GLES3 worked really fine on my device, the bug appeared suddenly from the Godot 3.2 RC2. I'm trying to remove any RC2 changes from the source to find the commit that caused this bug. I'll update ASAP. |
@Calinou |
From my point of view the availability of GLES3 on old devices is definitely enough today, I sincerely think that Godot 3.2 and from it to 4.2 too, have some bug in the GLES3 implementation, here I think to have found one and I hope to can found a fix ASAP |
No, it doesn't work like that. Open GL ES 2.0 is a much more limited API (closer to OpenGL 2.1 while OpenGL ES 3.0 is closer to 3.3). |
My Internet is stable again. I have added more logs in the last 3 days. logcat_debug_android It gets stuck here on
@joined72: If you have time then you could check setEGLConfigChooser(8, 8, 8, 8, 16, 0);
setEGLContextClientVersion(3); Note: The call |
Just updated! :)
@Alex2782 : I'll try to do my best. In the meantime I observed an error that is presents only in the logcat of not working app...
Do you think this could be one of the bug causes? |
logcat.moto.e5.play.txt.zip |
@Alex2782 I try to change the |
@Alex2782 I asked the Google AI (Bard) to analyze our bug and this is the answer... I have reviewed the bug report you provided, and I believe that the issue is caused by a bug in the Godot Engine's Shader compiler. The compiler is attempting to optimize the shader code, but it is doing so in a way that is causing the shader to crash. Here are a few possible solutions to this problem:
I recommend that you report this bug to the Godot Engine developers so that they can fix it. In the meantime, you can try disabling shader optimization or manually rewriting the shader. What do you think about? UPDATE: To disable shader caching, go to the Project Settings window and find the Rendering section. Under Shaders, uncheck the Enable shader caching checkbox. |
ChatGPT usually delivers better results, but is often useless for complex and hardware-specific problems,
The parameters must remain the same works (Context is created): setEGLConfigChooser(8, 8, 8, 8, 16, 0);
setEGLContextClientVersion(3); (why) not (?): setEGLConfigChooser(new RegularConfigChooser(8, 8, 8, 8, 16, 0))); int[] attrib_list = { EGL_CONTEXT_CLIENT_VERSION, version, EGL10.EGL_NONE };
context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list); |
I have commented out about 400 lines out of 2100 lines in 2 files. A 2D project starts, but rotates incorrectly. (It's ok on my Samsung Tab.)
Video: moto e5 play, on Firebase Test Labweb-build_20240117_rtel_pettyl-27-en_US-portrait_video.mp4@joined72: If you find time, you could search for In the Godot |
@Alex2782 I have full uncommented the |
@Alex2782 I found and fixed the float get_omni_spot_attenuation(float distance, float inv_range, float decay) {
...
...
...
return nd * pow(max(distance, 0.0001), -decay);
} in the following one: float get_omni_spot_attenuation(float distance, float inv_range, float decay) {
...
...
...
return nd * (1 / pow(max(distance, 0.0001), decay));
}
I don't know WHY but on my device works fine ONLY with this specific change. |
That sounds like a compliance issue with the drivers, as it's supposed to support negative exponents, but as a compatibility fix it makes sense, compensating for broken drivers As |
What error did you fix exactly? Wrong rotation? |
Now the app run fine on my device, without freeze and showing the main scene and I can interact with it, the unique remaining bug (on my device) is the Rotation Bug (also with the default Project Options, WORKS FINE)! :) |
Ok that's strange, I still don't understand this bug. 😄 I will continue with |
I decommented ALL |
I just updated my This is to confirm that this fix works fine also on the official
@AThousandShips I guess you're right, it might be that this specific driver didn't implement "negative exponent" on the |
About the "Wrong Rotation Bug" seems to be a know bug. I'm trying to working on it... |
The bugfix also works on
You could try I have reduced the example to 3 objects to see the orientation better. The objects are always displayed at the bottom left on my Samsung Tab S7. UPDATE: on
|
@Alex2782 I don't understand how to use
So now I'm trying to identify the first 3.0 version where this bug occurs for the first time so to can isolate and fix it. |
This comment was marked as outdated.
This comment was marked as outdated.
https://github.com/godotengine/godot-demo-projects @joined72 After that we can create 2 APKs, one version |
OK, I'll try! ;) |
Tested versions
Godot 4.2.1
System information
Android 8.0 - Godot 4.2.1 Compatibility Rendering (GLES3)
Issue description
I created an empty project with an empty scene with the Compatibility Rendering modality, after exported it for Android and upload to my Old Huawei 10" Tablet (Android 8 updated on Sep/2020), results?
After showing the Godot Logo the app freeze.
Initially, I was discouraged thinking that my old tablet probably missing the OpenGL ES 3.0 driver/feature (GLES3) but to be sure I installed GFXBench, an Android App able to test and bench all the device’s graphic abilities.
The app showed me that my device has full support for OpenGL ES 1.0, 2.0, and 3.0 but hasn’t any support for Vulkan, OpenGL ES 3.1 and 3.2.
To be sure I executed all the OpenGL ES 3.0 tests and to my great surprise, all works fine, as you can see from the following image.
So now my question is… how can I help to fix this bug?
Steps to reproduce
You need an Old Android Device.
Minimal reproduction project (MRP)
Any empty project with an empty scene in Compatibility Modality
The text was updated successfully, but these errors were encountered: