IMO you will need to check for the ES version too, something like this:
https://patchwork.freedesktop.org/patch/36417/
On 05/06/2016 11:22 PM, Lars Hamre wrote:
The conditions for which certain built-in special variables
can be declared invariant were not being checked.
OpenGL ES 1.00 specifi
The conditions for which certain built-in special variables
can be declared invariant were not being checked.
OpenGL ES 1.00 specification "Invariance and linkage":
For the built-in special variables, gl_FragCoord can
only be declared invariant if and only if gl_Position is
declared invariant. Si