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.
Hi petrik,
First of all thanks for your report. I've spent some time trying to reproduce and confirm the problems reported and here is what I have found.
I'm using ARM Mali OpenGL ES 3.0 Emulator for Windows, version 1.3 (the latest at the time of writing) and I'm getting the correct error message: error C7538: OpenGL does not allow 'inout' after 'highp' when using the incorrect order of qualifiers.
error C7538: OpenGL does not allow 'inout' after 'highp'
Could you please let me know the exact version of the ARM Mali OpenGL ES 3.0 Emulator for Windows you are using? You can find the version number in Control Panel -> Program Features, assuming you have Microsoft Windows 7 installed.
Could you also provide the info on what graphics card and what drivers version you have installed in your system? It can be easily found by running dxdiag in the Command Prompt window and switching to Display tab.
And the reason layout(std140) uniform Buffer; fails to compile is that std140 must be used with uniform block, see section 4.3.8.3 Uniform Block Layout Qualifiers for more details.
But for example following code with uniform block defined compiles correctly:
layout(std140) uniform Buffer {uint ui;};
Cheers,
Jacek