Attempting to link this pair of shaders causes a crash in glLinkProgram on both Nexus 4 and Moto X 2nd Gen devices (Nexus is runing 5.1, Moto is running 5.0).
https://gist.github.com/eodabash/db7a20b47214a232ef66
Commenting out either of these two lines in the fragment shader seems to stop the crash:
Material material = _material;
vec3 eyePos = _camera.EyePos;
Hello Evan, and apologies for the late response.
We were able to reproduce the issue and it is being investigated.
We'll keep you informed of any resolution regarding the crash.
Many thanks for the report.
Any updates on this? I have the same problem. The process enter glLinkProgram() and exits the process. It probably hits an assert or something down there because there is no tombestone generated.
Hi Kalle.. Can you confirm which device and build/date you are running this app on?
thanks...
Hi,
Thanks for looking into this!
I'm using CyanogenMod 13.0-20160602-osprey on a MotoG3.
The offending program can be found at https://gist.github.com/kalle/9837fb063eaaf99696c0ba38f1684f1e (vertex shader at the bottom). This happen with unoptimized code as well.
This is turning out to be a bit more difficult to diagnose, as we can not repropduce and need more information about the exact version of shader compiler that was used in this CyanogenMod build. Can you provide any additional information and perhaps log files generated during the program run?
Hello,
I have created an Android project that can repeat the crash on my phone: https://github.com/kalle/gllinkcrash
When I run the app it will log this:
Hi,
Did you had a chance to look at this?
///Kalle
Our current investigation is leading to the conclusion that the shader compiler version reported (XE031.06.00.05) should not be used with the class of graphics hardware for the MotoG3 device (Adreno 320/330).
OK. Perhaps I posted this in the wrong thread. The MotoG3 as an Adreno 306 and not a 320/330 as the title of this thread suggest.
Is shader compiler correct for that GPU?
This has nothing to do with Cyanogen putting the wrong compiler into its distribution.
I ran the test app on a couple of Adreno mobiles on Google's Could Test Lab with pretty dissapointing results. On Nexus 4 and 5 the app crashed on two different Android versions. But on Nexus 6 it did work (but EGLContext v3 was created despite that the app asked for a v2 context).
Here are the log outputs: https://gist.github.com/kalle/f9d884fca3ea6710f526ca3e7bbd107b
After a bit more research, this problem is not unique to Cyanogen builds. The problem is a known bug, but fixed in recent drivers. However unfortunately we are dependent on our OEMs updating the drivers in their released builds.