Adreno 420 / Qualcomm driver issue / Android 5.1 on Nexus 6

140 views
Skip to first unread message

Michael Leahy

unread,
Apr 15, 2015, 4:04:01 PM4/15/15
to modern-java6-a...@googlegroups.com
Well, it seems like the Nexus 6 finally got a GPU driver update from Qualcomm that sort of brings OpenGL ES 3.1 to the Adreno 420. The date seemingly of the GPU driver build is 1.29.15, so fairly recent and was part of the Android 5.1 firmware delivered to the Nexus 6 in the past couple of weeks. 

One can now create an OpenGL ES 3.1 context on the Nexus 6 so the compute shader examples are now selectable, but the compute shaders fail to run because the Qualcomm driver does not completely support all of the required format layout qualifiers. These qualifiers can be found on the bottom right of page 5 of the 3.1 reference card. https://www.khronos.org/files/opengles31-quick-reference-card.pdf

The ES spec lists 5 floating point layout formats (rgba32f, rgba16f, r32f, rgba8, rgba8_snorm) available and these can be used with images in compute shaders. Sadly with the current Qualcomm driver only "r32f" is supported which doesn't help all too much because "rgba8" is the standard image format and is what is used in all of the gldemos compute shader examples. When compiling the compute shaders used in the gldemos repo they fail to build on the Nexus 6 / Adreno 420 with this error:

    ERROR: 0:29: '' : unsupported format on read/write image
    ERROR: 0:30: '' : unsupported format on read/write image
    ERROR: 2 compilation errors.  No code generated.

Notice the "unsupported format" which doesn't mean it's not supported by the GLES 3.1 specification, but that the Qualcomm driver is incomplete. 

Nvidia has had stellar support for OpenGL ES 3.1 from the launch of the Tegra K1 last summer. I verified that the Tegra K1 works with all of the layout formats specified in the GLES 3.1 specification. 

Qualcomm please fix your driver for proper GLES 3.1 / compute shader support!



nathan ramsey

unread,
Jun 12, 2015, 4:39:08 PM6/12/15
to modern-java6-a...@googlegroups.com
Wow, what a let down. Appreciate the explanation. Seems to me that this should fail CTS, and it's shipping on the Nexus flagship :(

Michael Leahy

unread,
Jun 12, 2015, 4:52:38 PM6/12/15
to modern-java6-a...@googlegroups.com
Well.. I did do a bit more work on the shaders to try and get things working across devices at the end of April and things now work on the 805 / Adreno 420. Well. It seems the "ComputeInvert" example has a problem when you invert then go back to normal that isn't seen on other devices.  I am having problems with the Mali T760 / Galaxy S6 for the basic ray tracing example and this is the only one that is still causing problems in compilation of the shader. It seems with each additional bump with firmware the Nexus 6 got a better GPU driver, so now things seem to be working OK. The most I had to change the shader code to play nice with the parser actually was for the Mali T760 / S6 which was really strict in where things were placed. IE no comments at the top of the file and a bunch of other directives that the other GPU manufacturers didn't require. NVidia seems to have the best parser / least strict, but that also is because they likely get to use / duplicate the effort with their desktop setup these days which is really well tested. 

The trick with this mobile generation is that since there is no major GPU manufacturer owning all the flagships (like Qualcomm in the past) one is going to have to write shader code that works with all the different parsers. I was surprised how finicky things were! I'm going to have some more time soon to do another update in July and perhaps adds a few more demos. 

This repo is partially out there to test and provide examples for cross-GPU modern shader support. Hopefully I'll have some time to put up some really snazzy demos too besides the basic ones there already. Thanks for taking a look!

nathan acme

unread,
Jun 12, 2015, 5:31:29 PM6/12/15
to modern-java6-a...@googlegroups.com
I found that the inversion shader that I was running (that lead me to the Adreno compiler error that lead me to your forum) may have had an error in it.

The inversion shader I was using was from the Nvidia samples, https://github.com/NVIDIAGameWorks/OpenGLSamples (specifically, the basic compute sample.)

When I tried to compile that shader with the Intel driver on the Nexus Player (5.1.1 LMY47V) I received this error message:

    ERROR: 0:3: 'image2D' : except for image variables qualified with the format qualifiers <r32f>, <r32i> or <r32ui>, image variables must specify at least one of the memory qualifiers <readonly> or <writeonly>

Adding "readonly" and "writeonly" to the declarations, e.g.:

    layout(binding=0, rgba8) uniform mediump readonly image2D inputImage;

.. fixed the compiler error, and the shader ran fine on the Atom's GPU. Running the fixed shader on the Adreno driver now works fine. (I'm still having issues with the Mali driver on the Note 4.)

nathan acme

unread,
Jun 12, 2015, 5:33:46 PM6/12/15
to modern-java6-a...@googlegroups.com
Awesome, thanks for the update and the samples. (You must mean the 805/420 though, right?)

Michael Leahy

unread,
Jun 12, 2015, 5:41:33 PM6/12/15
to modern-java6-a...@googlegroups.com
Oh yes... The 420 / corrected that...  Yeah.. The Mali GPUs like the Intel atom really were strict on requiring memory qualifiers. It's definitely a pain point that I couldn't find much information about regarding writing cross-GPU shaders yet. 

The problem I see on the Nexus 6 / 805 for ComputeInvert is that after switching back to normal from invert the texture / display is black. Go back to invert and it shows up. On other devices (including 810 / 430) of course switching back and forth works fine, so things definitely were a bit janky for Qualcomm rolling out proper drivers and or Motorola updating things properly. I'll post an update to the Github page and forums in July on where things stand with the current essential demos. 
Reply all
Reply to author
Forward
0 new messages