-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
glLinkProgram crashes on Adreno 3xx #3640
Comments
Thank you. Adreno 30x GPUs have old drivers that we know had many issues with OpenGL ES 3.0 support. According to those traces we can't really go past the driver initialization. |
Yes, I noticed that the Adreno 30x series is buggy based on the issues, just find it interesting that one of the examples work, so there is path. |
Ok, I took a look at the Android Play Store device catalog, and in my opinion, one should assume that Filament supports SDK 24 and up, by exclusion. It is the cut-off SDK that removes all these crappy Adreno GPUs and still supports decent older devices. The Adreno 30x family dominates the device list under that SDK. |
I don't have a device I can test. But I will add some debug code so we at least get better logging than a crash on the driver. We'll go from there. |
Actually I thought the problem was because of the EGL_BAD_ATTRIBUTE, but it's not. Please attach the section of the log with the crash report. |
Sorry, sometimes the logcat does not show the whole crash. `2021-03-15 15:35:35.318 14245-14245/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
2021-03-15 15:35:36.037 14265-14293/com.google.android.filament.litcube A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x60 in tid 14293 (FEngine::loop) |
Looks like a crash when linking a GLSL program. |
I'm afraid there's not much we can do here :-\ |
Thank you, I don't think it makes sense to try to fix these issues at this point. Anyway, I will require SDK 24 and up to download my app as it will remove 70-80% of the bad devices. |
Ok, some interesting findings after some testing:
|
I am building Filament using this command ./build.sh -p desktop,android -i release |
The pre-built libraries are also built with the |
I recently met a glProgram crash problem on an android phone(vivo Y71A, Qualcomm, Adreno (TM) 308). The glsl shader code(fragment shader in my case) that caused the crash is like this:
To fix it, just put another break at the end of the while loop. like this:
In my case I used UbershaderLoader,so the shader is generated using matc tool, you need to change the source code of spirv_glsl.cpp
before it, add
and they should be within the same "if" control block of course. and then build matc again. I turned to build an matc project myself, but I think you can just generate the tools again :
At last, use the new tools to generate the materials. |
Describe the bug
Lit-cube app crashes on start.
Hello-triangle example shows a very similar logcat and it does not crash but it does not render anything. Every other example behaves the same way.
Surprisingly, the transparent view example is the only one that works, some dropped frames though.
To Reproduce
Run the stock lit-cube example
Expected behavior
Cube rendered
Smartphone (please complete the following information):
Additional context
Logcat lit-cube:
2021-03-11 18:00:54.566 2510-2510/? I/zygote: Late-enabling -Xcheck:jni
2021-03-11 18:00:55.037 2510-2510/com.google.android.filament.litcube I/Filament: FEngine (32 bits) created at 0x94200000 (threading is enabled)
2021-03-11 18:00:55.038 2510-2567/com.google.android.filament.litcube D/Filament: FEngine resolved backend: OpenGL
2021-03-11 18:00:55.039 2510-2567/com.google.android.filament.litcube I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 02/27/18, 3273d9c, I0b59f3a7cf
2021-03-11 18:00:55.149 2510-2569/com.google.android.filament.litcube D/OpenGLRenderer: HWUI GL Pipeline
2021-03-11 18:00:55.189 2510-2569/com.google.android.filament.litcube I/OpenGLRenderer: Initialized EGL, version 1.4
2021-03-11 18:00:55.189 2510-2569/com.google.android.filament.litcube D/OpenGLRenderer: Swap behavior 2
2021-03-11 18:00:55.194 2510-2569/com.google.android.filament.litcube W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
2021-03-11 18:00:55.579 2510-2567/com.google.android.filament.litcube W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
2021-03-11 18:00:55.641 2510-2567/com.google.android.filament.litcube A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x60 in tid 2567 (FEngine::loop)
Logcat hello-triangle:
2021-03-11 18:07:27.444 2770-2770/? I/zygote: Late-enabling -Xcheck:jni
2021-03-11 18:07:27.851 2770-2770/com.google.android.filament.hellotriangle I/Filament: FEngine (32 bits) created at 0x94200000 (threading is enabled)
2021-03-11 18:07:27.853 2770-2797/com.google.android.filament.hellotriangle D/Filament: FEngine resolved backend: OpenGL
2021-03-11 18:07:27.854 2770-2797/com.google.android.filament.hellotriangle I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 02/27/18, 3273d9c, I0b59f3a7cf
2021-03-11 18:07:27.965 2770-2799/com.google.android.filament.hellotriangle D/OpenGLRenderer: HWUI GL Pipeline
2021-03-11 18:07:28.011 2770-2799/com.google.android.filament.hellotriangle I/OpenGLRenderer: Initialized EGL, version 1.4
2021-03-11 18:07:28.011 2770-2799/com.google.android.filament.hellotriangle D/OpenGLRenderer: Swap behavior 2
2021-03-11 18:07:28.017 2770-2799/com.google.android.filament.hellotriangle W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
2021-03-11 18:07:28.241 2770-2797/com.google.android.filament.hellotriangle W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
2021-03-11 18:07:32.749 2770-2775/com.google.android.filament.hellotriangle I/zygote: Do partial code cache collection, code=31KB, data=25KB
2021-03-11 18:07:32.750 2770-2775/com.google.android.filament.hellotriangle I/zygote: After code cache collection, code=31KB, data=25KB
2021-03-11 18:07:32.751 2770-2775/com.google.android.filament.hellotriangle I/zygote: Increasing code cache capacity to 128KB
The text was updated successfully, but these errors were encountered: