This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Issue with qualifier order parsing in Mali GLSL compiler?

The Mali OpenGL ES 3.0 emulator on Windows seems to require some qualifiers to be in the opposite order as the spec says.

For instance, Mali SDK is happy with the following function:

   void foo (highp inout float bar) { ... }

but the spec seems to indicate that the following is correct:

   void foo (inout highp float bar) { ... }

That is, the precision qualifier should always follow the parameter qualifier. This is specified in chapter 4.7 Order of Qualification in the GLSL spec.

Another similar issue is with specifying interface qualifiers and precision qualifiers for attributes (and probably varyings, too). Mali accepts:

   highp in float;

whereas spec seems to say the opposite order is, again, correct:

    in highp float;

The same chapter on qualifier ordering doesn't mention interface-qualifier at all (I'm guessing this is a spec omission), but there are some examples in the spec that seem to validate that the precision qualifier should follow the interface qualifier (e.g., chapter 7.1 Vertex Shader Special Variables includes "in highp int gl_VertexID" and a bunch of others in same order).

I get the following error from the above: "error C7538: OpenGL does not allow 'highp' after 'inout'"

* *

Also, I noticed that the driver doesn't seem to accept layout qualifiers for uniforms, at least not in the order that the spec says they should be in. The following does not compile:

   layout(std140) uniform Buffer;

I didn't investigate this further, because I didn't really need the feature.

0