only declare compatibility gl_ variables in compatibility mode

avoid declaring them in GLSL 1.50+ if core profile is chosen by the
version statement

fixes #2663
This commit is contained in:
Malcolm Bechard 2021-06-10 21:42:46 -04:00
parent fe15158676
commit 275d7ae882
15 changed files with 62 additions and 67 deletions

View file

@ -4,7 +4,7 @@ ERROR: 0:22: 'textureGatherOffset(...)' : must be a compile-time constant: compo
ERROR: 0:23: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument
ERROR: 0:30: 'location qualifier on input' : not supported for this version or the enabled extensions
ERROR: 0:38: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 0:40: 'redeclaration' : cannot apply layout qualifier to gl_Color
ERROR: 0:40: 'gl_Color' : identifiers starting with "gl_" are reserved
ERROR: 0:41: 'redeclaration' : cannot change qualification of gl_ClipDistance
ERROR: 0:43: 'gl_FragCoord' : cannot redeclare after use
ERROR: 0:51: 'texel offset' : argument must be compile-time constant
@ -516,7 +516,7 @@ ERROR: node is still EOpNull!
0:? 'vl' (layout( location=4) smooth in 4-component vector of float)
0:? 'vl2' (layout( location=6) smooth in 4-component vector of float)
0:? 'uv3' (layout( location=3) uniform 3-component vector of float)
0:? 'anon@0' ( in block{ in float FogFragCoord gl_FogFragCoord, in unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
0:? 'gl_Color' (layout( location=5) smooth in 4-component vector of float)
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
0:? 'u2drs' ( uniform sampler2DRectShadow)
0:? 'patchIn' ( smooth patch in 4-component vector of float)
@ -691,7 +691,7 @@ ERROR: node is still EOpNull!
0:? 'vl' (layout( location=4) smooth in 4-component vector of float)
0:? 'vl2' (layout( location=6) smooth in 4-component vector of float)
0:? 'uv3' (layout( location=3) uniform 3-component vector of float)
0:? 'anon@0' ( in block{ in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
0:? 'gl_Color' (layout( location=5) smooth in 4-component vector of float)
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
0:? 'u2drs' ( uniform sampler2DRectShadow)
0:? 'patchIn' ( smooth patch in 4-component vector of float)