Since my shaders are shared across GL and GLES scenarios, the former rely on the #if macro apparatus to discriminated between platforms. This is how I’ve stumbled across the following issue:
The GLSL compiler from Creator’s GLES stack ver. 1.13@3341330 may omit to define the GL_ES=1 macro in the scope of a GLSL translation unit. This behaviour is intermittent - it happens once in many runs, but without much determinism. I suspect some dependence on an internally-cached state in the driver might be at play.
Here are two shaders - a vertex one and a fragment one, which show the general mechanism I use to differentiate between GL and GLES, and which shaders occasionally trigger the issue. The latter manifests like this (first log is from the vertex and second - from the fragment shader):
shader compile log: Success.
shader compile log: Compile failed.
ERROR: 0:16: 'shader in & out declarations' : requires language version 130
ERROR: 1 compilation errors. No code generated.