Skip to content

Commit

Permalink
Merge pull request KhronosGroup#2664 from mbechard/master
Browse files Browse the repository at this point in the history
only declare compatibility gl_ variables in compatibility mode
  • Loading branch information
greg-lunarg authored Jun 17, 2021
2 parents b9d06bd + 275d7ae commit e74b35f
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 67 deletions.
3 changes: 1 addition & 2 deletions Test/baseResults/150.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ERROR: 0:4: 'redeclaration' : cannot redeclare with different qualification: gl_
ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
ERROR: 0:50: 'gl_PerFragment' : cannot be used (maybe an instance name is needed)
ERROR: 0:50: 'gl_PerFragment' : undeclared identifier
ERROR: 0:53: 'double' : Reserved word.
ERROR: 0:53: 'double' : not supported for this version or the enabled extensions
Expand All @@ -18,7 +17,7 @@ ERROR: 0:154: 'assign' : cannot convert from ' const float' to ' temp 2-compone
ERROR: 0:155: 'textureQueryLod' : no matching overloaded function found
ERROR: 0:155: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
ERROR: 0:183: 'mix' : required extension not requested: GL_EXT_shader_integer_mix
ERROR: 19 compilation errors. No code generated.
ERROR: 18 compilation errors. No code generated.


Shader version: 150
Expand Down
31 changes: 11 additions & 20 deletions Test/baseResults/150.vert.out
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
150.vert
ERROR: 0:18: 'gl_ClipVertex' : undeclared identifier
ERROR: 0:18: 'assign' : cannot convert from ' in 4-component vector of float' to ' temp float'
ERROR: 0:26: 'a' : cannot redeclare a user-block member array
ERROR: 0:28: 'double' : Reserved word.
ERROR: 0:28: 'double' : not supported for this version or the enabled extensions
ERROR: 0:28: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
ERROR: 0:3001: '#error' : line of this error should be 3001
ERROR: 5 compilation errors. No code generated.
ERROR: 7 compilation errors. No code generated.


Shader version: 150
Expand All @@ -15,20 +17,20 @@ ERROR: node is still EOpNull!
0:15 Sequence
0:15 move second child to first child ( temp 4-component vector of float)
0:15 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
0:15 Constant:
0:15 0 (const uint)
0:15 'iv4' ( in 4-component vector of float)
0:16 move second child to first child ( temp float)
0:16 gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
0:16 Constant:
0:16 1 (const uint)
0:16 'ps' ( uniform float)
0:17 move second child to first child ( temp float)
0:17 direct index ( temp float ClipDistance)
0:17 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance)
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
0:17 Constant:
0:17 2 (const uint)
0:17 Constant:
Expand All @@ -37,12 +39,7 @@ ERROR: node is still EOpNull!
0:17 'iv4' ( in 4-component vector of float)
0:17 Constant:
0:17 0 (const int)
0:18 move second child to first child ( temp 4-component vector of float)
0:18 gl_ClipVertex: direct index for structure ( gl_ClipVertex 4-component vector of float ClipVertex)
0:18 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:18 Constant:
0:18 3 (const uint)
0:18 'iv4' ( in 4-component vector of float)
0:18 'gl_ClipVertex' ( temp float)
0:? Linker Objects
0:? 'iv4' ( in 4-component vector of float)
0:? 'ps' ( uniform float)
Expand All @@ -67,7 +64,6 @@ ERROR: node is still EOpNull!

Linked vertex stage:

ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)

Shader version: 150
Requested GL_ARB_vertex_attrib_64bit
Expand All @@ -77,20 +73,20 @@ ERROR: node is still EOpNull!
0:15 Sequence
0:15 move second child to first child ( temp 4-component vector of float)
0:15 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
0:15 Constant:
0:15 0 (const uint)
0:15 'iv4' ( in 4-component vector of float)
0:16 move second child to first child ( temp float)
0:16 gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
0:16 Constant:
0:16 1 (const uint)
0:16 'ps' ( uniform float)
0:17 move second child to first child ( temp float)
0:17 direct index ( temp float ClipDistance)
0:17 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance)
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
0:17 Constant:
0:17 2 (const uint)
0:17 Constant:
Expand All @@ -99,12 +95,7 @@ ERROR: node is still EOpNull!
0:17 'iv4' ( in 4-component vector of float)
0:17 Constant:
0:17 0 (const int)
0:18 move second child to first child ( temp 4-component vector of float)
0:18 gl_ClipVertex: direct index for structure ( gl_ClipVertex 4-component vector of float ClipVertex)
0:18 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:18 Constant:
0:18 3 (const uint)
0:18 'iv4' ( in 4-component vector of float)
0:18 'gl_ClipVertex' ( temp float)
0:? Linker Objects
0:? 'iv4' ( in 4-component vector of float)
0:? 'ps' ( uniform float)
Expand Down
6 changes: 3 additions & 3 deletions Test/baseResults/400.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Test/baseResults/430scope.vert.out
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ERROR: node is still EOpNull!
0:47 3.000000
0:49 move second child to first child ( temp 4-component vector of float)
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:49 Constant:
0:49 0 (const uint)
0:49 Construct vec4 ( temp 4-component vector of float)
Expand Down Expand Up @@ -168,7 +168,7 @@ ERROR: node is still EOpNull!
0:47 3.000000
0:49 move second child to first child ( temp 4-component vector of float)
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:49 Constant:
0:49 0 (const uint)
0:49 Construct vec4 ( temp 4-component vector of float)
Expand Down
4 changes: 2 additions & 2 deletions Test/baseResults/450.vert.out
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ERROR: node is still EOpNull!
0:9 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance)
0:9 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
0:9 Constant:
0:9 10 (const uint)
0:9 3 (const uint)
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
Expand Down Expand Up @@ -98,7 +98,7 @@ ERROR: node is still EOpNull!
0:9 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance)
0:9 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
0:9 Constant:
0:9 10 (const uint)
0:9 3 (const uint)
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
Expand Down
Loading

0 comments on commit e74b35f

Please sign in to comment.