Track what ins/outs/uniforms are used, so that errors like "declare after use" or...
authorJohn Kessenich <cepheus@frii.com>
Wed, 20 Nov 2013 21:12:43 +0000 (21:12 +0000)
committerJohn Kessenich <cepheus@frii.com>
Wed, 20 Nov 2013 21:12:43 +0000 (21:12 +0000)
Also made all tests in testlist include linker tests.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24156 e7fa87d3-cd2b-0410-9028-fcbf551c1848

114 files changed:
Test/150.frag
Test/150.vert
Test/330.frag
Test/400.frag
Test/baseResults/100.frag.out
Test/baseResults/100Limits.vert.out
Test/baseResults/100scope.vert.out
Test/baseResults/120.frag.out
Test/baseResults/120.vert.out
Test/baseResults/130.frag.out
Test/baseResults/140.frag.out
Test/baseResults/150.frag.out
Test/baseResults/150.geom.out
Test/baseResults/150.vert.out
Test/baseResults/300.frag.out
Test/baseResults/300.vert.out
Test/baseResults/300BuiltIns.frag.out
Test/baseResults/300block.frag.out
Test/baseResults/300layout.frag.out
Test/baseResults/300layout.vert.out
Test/baseResults/300operations.frag.out
Test/baseResults/300scope.vert.out
Test/baseResults/330.frag.out
Test/baseResults/330comp.frag.out
Test/baseResults/400.frag.out
Test/baseResults/400.geom.out
Test/baseResults/400.tesc.out
Test/baseResults/400.tese.out
Test/baseResults/410.geom.out
Test/baseResults/420.geom.out
Test/baseResults/420.tese.out
Test/baseResults/420.vert.out
Test/baseResults/430.comp.out
Test/baseResults/430.vert.out
Test/baseResults/430scope.vert.out
Test/baseResults/Operations.frag.out
Test/baseResults/aggOps.frag.out
Test/baseResults/always-discard.frag.out
Test/baseResults/always-discard2.frag.out
Test/baseResults/array.frag.out
Test/baseResults/array100.frag.out
Test/baseResults/comment.frag.out
Test/baseResults/conditionalDiscard.frag.out
Test/baseResults/constErrors.frag.out
Test/baseResults/constFold.frag.out
Test/baseResults/conversion.frag.out
Test/baseResults/cppComplexExpr.vert.out
Test/baseResults/cppIndent.vert.out
Test/baseResults/cppNest.vert.out
Test/baseResults/cppSimple.vert.out
Test/baseResults/dataOut.frag.out
Test/baseResults/dataOutIndirect.frag.out
Test/baseResults/dce.frag.out
Test/baseResults/decls.frag.out
Test/baseResults/deepRvalue.frag.out
Test/baseResults/depthOut.frag.out
Test/baseResults/discard-dce.frag.out
Test/baseResults/doWhileLoop.frag.out
Test/baseResults/earlyReturnDiscard.frag.out
Test/baseResults/errors.frag.out
Test/baseResults/flowControl.frag.out
Test/baseResults/forLoop.frag.out
Test/baseResults/forwardRef.frag.out
Test/baseResults/functionCall.frag.out
Test/baseResults/functionSemantics.frag.out
Test/baseResults/length.frag.out
Test/baseResults/lineContinuation.vert.out
Test/baseResults/lineContinuation100.vert.out
Test/baseResults/localAggregates.frag.out
Test/baseResults/loops.frag.out
Test/baseResults/loopsArtificial.frag.out
Test/baseResults/matrix.frag.out
Test/baseResults/matrix2.frag.out
Test/baseResults/matrixError.vert.out
Test/baseResults/newTexture.frag.out
Test/baseResults/nonSquare.vert.out
Test/baseResults/numeral.frag.out
Test/baseResults/pointCoord.frag.out
Test/baseResults/precision.frag.out
Test/baseResults/precision.vert.out
Test/baseResults/prepost.frag.out
Test/baseResults/sample.frag.out
Test/baseResults/sample.vert.out
Test/baseResults/simpleFunctionCall.frag.out
Test/baseResults/specExamples.frag.out
Test/baseResults/specExamples.vert.out
Test/baseResults/structAssignment.frag.out
Test/baseResults/structDeref.frag.out
Test/baseResults/structure.frag.out
Test/baseResults/switch.frag.out
Test/baseResults/swizzle.frag.out
Test/baseResults/syntaxError.frag.out
Test/baseResults/test.frag.out
Test/baseResults/texture.frag.out
Test/baseResults/tokenLength.vert.out
Test/baseResults/types.frag.out
Test/baseResults/uint.frag.out
Test/baseResults/uniformArray.frag.out
Test/baseResults/variableArrayIndex.frag.out
Test/baseResults/varyingArray.frag.out
Test/baseResults/varyingArrayIndirect.frag.out
Test/baseResults/versionsClean.frag.out
Test/baseResults/versionsClean.vert.out
Test/baseResults/versionsErrors.frag.out
Test/baseResults/versionsErrors.vert.out
Test/baseResults/voidFunction.frag.out
Test/baseResults/whileLoop.frag.out
Test/runtests
Todo.txt
glslang/Include/Types.h
glslang/MachineIndependent/ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.h
glslang/MachineIndependent/linkValidate.cpp
glslang/MachineIndependent/localintermediate.h

index fb15a00..d4d4488 100644 (file)
@@ -11,4 +11,4 @@ void main()
     vec4 c = gl_FragCoord;\r
 }\r
 \r
-layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;\r
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;  // ERROR, declared after use\r
index cc7642c..68a996e 100644 (file)
@@ -11,6 +11,7 @@ void main()
     gl_Position = iv4;\r
     gl_PointSize = ps;\r
     gl_ClipDistance[2] = iv4.x;\r
+    gl_ClipVertex = iv4;\r
 }\r
 \r
 float gl_ClipDistance[4];\r
index c96cf40..26b98da 100644 (file)
@@ -7,8 +7,8 @@ varying vec4 varyingVar;
 
 void main()
 {
-    gl_FragColor = varyingVar;
-    gl_FragData[1] = inVar;
+    gl_FragColor = varyingVar;  // link ERROR: user output was used
+    gl_FragData[1] = inVar;     // link ERROR: user output was used
     int buffer = 4;
 }
 
@@ -21,4 +21,5 @@ in gl_PerFragment {
 void foo()
 {
     vec4 c = gl_Color;
+    outVar = inVar;
 }
index 82cd3ab..bce9d88 100644 (file)
@@ -38,4 +38,4 @@ layout(location = 3) uniform vec3 uv3;
 layout(location = 5) in vec4 gl_Color;      // ERROR, layout
 noperspective in float gl_ClipDistance[4];  // ERROR, can't change qualifier
 
-layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;  // ERROR, declared after use
index 9a5c37e..fa77261 100644 (file)
@@ -1,3 +1,4 @@
+100.frag\r
 ERROR: 0:3: '{ } style initializers' : not supported with this profile: es\r
 ERROR: 0:3: 'initializer' : not supported for this version or the enabled extensions \r
 ERROR: 0:3: 'array initializer' : not supported for this version or the enabled extensions \r
@@ -63,6 +64,7 @@ ERROR: 0:150: 'floating-point suffix' : not supported for this version or the en
 ERROR: 0:152: '' :  syntax error\r
 ERROR: 56 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Sequence\r
 0:3    move second child to first child (3-element array of mediump int)\r
@@ -280,3 +282,8 @@ ERROR: node is still EOpNull!
 0:?     'f123' (mediump float)\r
 0:?     'f124' (mediump float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e8a297b..e561fcc 100644 (file)
@@ -1,3 +1,5 @@
+100Limits.vert\r
+\r
 0:? Sequence\r
 0:15  Function Definition: foo(f1; (void)\r
 0:15    Function Parameters: \r
 0:?       2.000000\r
 0:?       2.000000\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 4b948e3..02f1ad4 100644 (file)
@@ -1,3 +1,4 @@
+100scope.vert\r
 ERROR: 0:5: 'a' : redefinition \r
 ERROR: 0:17: 'b' : redeclaration of existing name \r
 ERROR: 0:19: 'f' : redefinition \r
@@ -8,6 +9,7 @@ ERROR: 0:54: 'z' : undeclared identifier
 ERROR: 0:54: 'z' : redefinition \r
 ERROR: 8 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Function Definition: f(i1;i1;i1; (highp int)\r
 0:3    Function Parameters: \r
@@ -111,3 +113,8 @@ ERROR: node is still EOpNull!
 0:?     'b' (bool)\r
 0:?     'tan' (highp float)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 3b8bd70..10c7036 100644 (file)
@@ -1,3 +1,4 @@
+120.frag\r
 ERROR: 0:9: 'in for stage inputs' : not supported for this version or the enabled extensions \r
 ERROR: 0:10: 'out for stage outputs' : not supported for this version or the enabled extensions \r
 ERROR: 0:54: '+' :  wrong operand types: no operation '+' exists that takes a left-hand operand of type '2-component vector of float' and a right operand of type '3-component vector of float' (or there is no acceptable conversion)\r
@@ -31,6 +32,7 @@ ERROR: 0:115: 'return' : void function cannot return a value
 ERROR: 0:125: 'gl_TexCoord' : redeclaration of array with size \r
 ERROR: 31 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:21  Function Definition: main( (void)\r
 0:21    Function Parameters: \r
@@ -317,3 +319,10 @@ ERROR: node is still EOpNull!
 0:?     'a' (int)\r
 0:?     'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+ERROR: Linking fragment stage: Recursion detected:\r
+    foo(f1; calling foo(f1;\r
+\r
+\r
index 5175d5b..790bb6d 100644 (file)
@@ -1,3 +1,4 @@
+120.vert\r
 ERROR: 0:3: 'in for stage inputs' : not supported for this version or the enabled extensions \r
 ERROR: 0:4: 'out for stage outputs' : not supported for this version or the enabled extensions \r
 ERROR: 0:11: 'gl_Position' : cannot add storage, auxiliary, memory, interpolation, or precision qualifier to an existing variable \r
@@ -44,6 +45,7 @@ ERROR: 0:111: 'overloadE' : no matching overloaded function found
 ERROR: 0:117: 'overloadF' : no matching overloaded function found \r
 ERROR: 44 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:15  Function Definition: main( (void)\r
 0:15    Function Parameters: \r
@@ -200,3 +202,8 @@ ERROR: node is still EOpNull!
 0:?     'concall' (const float)\r
 0:?       0.295520\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 203c973..ae0773b 100644 (file)
@@ -1,3 +1,4 @@
+130.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 ERROR: 0:25: 'texture gather function' : not supported for this version or the enabled extensions \r
 ERROR: 0:35: 'redeclaration' : cannot change the type of gl_Color\r
@@ -9,6 +10,7 @@ ERROR: 0:63: '>' :  wrong operand types: no operation '>' exists that takes a le
 ERROR: 0:64: '>=' :  wrong operand types: no operation '>=' exists that takes a left-hand operand of type 'const 2-component vector of uint' and a right operand of type 'const 2-component vector of uint' (or there is no acceptable conversion)\r
 ERROR: 7 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:16  Function Definition: main( (void)\r
 0:16    Function Parameters: \r
@@ -105,3 +107,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_Color' (smooth in 4-component vector of float)\r
 0:?     'gl_Color' (flat in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index d548dd0..4e963ee 100644 (file)
@@ -1,8 +1,10 @@
+140.frag\r
 Warning, version 140 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
 ERROR: 0:17: '#error' : GL_ES is not set  \r
 ERROR: 1 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:10  Function Definition: main( (void)\r
 0:10    Function Parameters: \r
@@ -21,3 +23,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_ClipDistance' (smooth in 5-element array of float)\r
 0:?     'gl_ClipDistance' (smooth in 5-element array of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 9d98ddf..398e38a 100644 (file)
@@ -1,8 +1,11 @@
+150.frag\r
 Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:4: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord\r
 ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord\r
 ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord \r
-ERROR: 3 compilation errors.  No code generated.\r
+ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use \r
+ERROR: 4 compilation errors.  No code generated.\r
+\r
 \r
 gl_FragCoord pixel center is integer\r
 gl_FragCoord origin is upper left\r
@@ -19,3 +22,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float)\r
 0:?     'foo' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 9ae6fa7..1fb5589 100644 (file)
@@ -1,3 +1,4 @@
+150.geom\r
 Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:15: 'fromVertex' : block instance name redefinition \r
 ERROR: 0:19: 'fromVertex' : redefinition \r
@@ -29,6 +30,7 @@ ERROR: 0:88: 'invocations' : not supported for this version or the enabled exten
 ERROR: 0:91: 'stream' : member cannot contradict block \r
 ERROR: 28 compilation errors.  No code generated.\r
 \r
+\r
 invocations = 4\r
 max_vertices = 127\r
 input primitive = lines_adjancency\r
@@ -139,3 +141,8 @@ ERROR: node is still EOpNull!
 0:?     '__anon__3' (layout(stream=3 ) out block{f15})\r
 0:?     '__anon__4' (layout(column_major shared ) uniform block{b15})\r
 \r
+\r
+Linked geometry stage:\r
+\r
+\r
+\r
index b9d9699..306c8a3 100644 (file)
@@ -1,7 +1,9 @@
+150.vert\r
 Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.\r
-ERROR: 0:21: 'a' : cannot redeclare a user-block member array \r
+ERROR: 0:22: 'a' : cannot redeclare a user-block member array \r
 ERROR: 1 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:9  Function Definition: main( (void)\r
 0:9    Function Parameters: \r
@@ -30,6 +32,12 @@ ERROR: node is still EOpNull!
 0:13          'iv4' (in 4-component vector of float)\r
 0:13          Constant:\r
 0:13            0 (const int)\r
+0:14      move second child to first child (4-component vector of float)\r
+0:14        gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float)\r
+0:14          '__anon__0' (out block{gl_Position,gl_PointSize,gl_ClipDistance,gl_ClipVertex,gl_FrontColor,gl_BackColor,gl_FrontSecondaryColor,gl_BackSecondaryColor,gl_TexCoord,gl_FogFragCoord})\r
+0:14          Constant:\r
+0:14            3 (const uint)\r
+0:14        'iv4' (in 4-component vector of float)\r
 0:?   Linker Objects\r
 0:?     'iv4' (in 4-component vector of float)\r
 0:?     'ps' (uniform float)\r
@@ -37,3 +45,9 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)\r
+\r
+\r
index 622033d..837afa8 100644 (file)
@@ -1,3 +1,4 @@
+300.frag\r
 ERROR: 0:30: 'noperspective' : Reserved word. \r
 ERROR: 0:30: 'noperspective' : not supported with this profile: es\r
 ERROR: 0:31: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: bads\r
@@ -28,6 +29,7 @@ ERROR: 0:126: 'imageBuffer' : Reserved word.
 ERROR: 0:126: '' :  syntax error\r
 ERROR: 28 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:53  Function Definition: main( (void)\r
 0:53    Function Parameters: \r
@@ -289,3 +291,9 @@ ERROR: node is still EOpNull!
 0:?     'st1' (uniform structure{i,s})\r
 0:?     'st2' (uniform structure{i,s})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+ERROR: Linking fragment stage: when more than one fragment shader output, all must have location qualifiers\r
+\r
+\r
index d27382d..4e113b2 100644 (file)
@@ -1,3 +1,4 @@
+300.vert\r
 ERROR: 0:8: 'varying' : Reserved word. \r
 ERROR: 0:8: 'varying' : no longer supported in es profile; removed in version 300\r
 ERROR: 0:9: 'vertex input arrays' : not supported with this profile: es\r
@@ -18,12 +19,14 @@ ERROR: 0:63: '' : array size required
 ERROR: 0:65: '' : array size required \r
 ERROR: 0:64: '' : array size required \r
 ERROR: 0:67: '' : array size required \r
+ERROR: 0:76: 'invariant' : cannot change qualification after use \r
 ERROR: 0:78: 'invariant' : can only apply to an output: invIn\r
 ERROR: 0:88: 'ub2' : Cannot reuse block name within the same interface: uniform\r
 ERROR: 0:92: 'ub2' : Cannot reuse block name within the same interface: uniform\r
 ERROR: 0:96: 'ub2' : Cannot reuse block name within the same interface: uniform\r
 ERROR: 0:104: 'ub3' : Cannot reuse block name within the same interface: uniform\r
-ERROR: 25 compilation errors.  No code generated.\r
+ERROR: 26 compilation errors.  No code generated.\r
+\r
 \r
 ERROR: node is still EOpNull!\r
 0:27  Function Definition: main( (void)\r
@@ -175,3 +178,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index bababaf..650d622 100644 (file)
@@ -1,7 +1,9 @@
+300BuiltIns.frag\r
 ERROR: 0:6: 'float' : type requires declaration of default precision qualifier \r
 ERROR: 0:70: 'noise2' : no matching overloaded function found \r
 ERROR: 2 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:26  Function Definition: main( (void)\r
 0:26    Function Parameters: \r
@@ -204,3 +206,8 @@ ERROR: node is still EOpNull!
 0:?     'v2b' (mediump 2-component vector of float)\r
 0:?     'v4' (mediump 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 6f2e670..7edaf56 100644 (file)
@@ -1,9 +1,11 @@
+300block.frag\r
 ERROR: 0:10: '' : cannot nest a structure definition inside a structure or block \r
 ERROR: 0:21: '' : cannot nest a structure definition inside a structure or block \r
 ERROR: 0:20: 'sampler' : member of block cannot be a sampler type \r
 ERROR: 0:45: 'variable indexing block array' : not supported with this profile: es\r
 ERROR: 4 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:42  Function Definition: main( (void)\r
 0:42    Function Parameters: \r
@@ -54,3 +56,8 @@ ERROR: node is still EOpNull!
 0:?     'insts' (layout(column_major shared ) uniform 4-element array of block{nbv,ni})\r
 0:?     '__anon__1' (layout(column_major shared ) uniform block{f,u})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 2992d2e..95d3596 100644 (file)
@@ -1,6 +1,8 @@
+300layout.frag\r
 ERROR: 0:4: 'location qualifier on input' : not supported in this stage: fragment\r
 ERROR: 1 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:10  Function Definition: main( (void)\r
 0:10    Function Parameters: \r
@@ -24,3 +26,8 @@ ERROR: node is still EOpNull!
 0:?     'p' (layout(location=3 ) out mediump 4-component vector of float)\r
 0:?     'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 445e794..0505fb5 100644 (file)
@@ -1,3 +1,4 @@
+300layout.vert\r
 ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es\r
 ERROR: 0:8: 'in' : cannot be a structure or array \r
 ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es\r
@@ -12,6 +13,7 @@ ERROR: 0:47: 'shared' : not supported with this profile: es
 ERROR: 0:47: 'shared' : not supported in this stage: vertex\r
 ERROR: 12 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:41  Function Definition: main( (void)\r
 0:41    Function Parameters: \r
@@ -68,3 +70,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index db033f1..0657e3d 100644 (file)
@@ -1,3 +1,4 @@
+300operations.frag\r
 ERROR: 0:11: 'float' : type requires declaration of default precision qualifier \r
 ERROR: 0:30: '+' :  wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout(column_major shared ) uniform block{f}' and a right operand of type 'layout(column_major shared ) uniform block{f}' (or there is no acceptable conversion)\r
 ERROR: 0:31: '+' :  wrong operand types: no operation '+' exists that takes a left-hand operand of type 'structure{i}' and a right operand of type 'structure{i}' (or there is no acceptable conversion)\r
@@ -56,6 +57,7 @@ ERROR: 0:89: '^' :  wrong operand types: no operation '^' exists that takes a le
 ERROR: 0:90: 'assign' :  l-value required \r
 ERROR: 56 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:13  Function Definition: main( (void)\r
 0:13    Function Parameters: \r
@@ -233,3 +235,8 @@ ERROR: node is still EOpNull!
 0:?     's' (structure{i})\r
 0:?     'a' (5-element array of mediump float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 455cd32..aa7f37e 100644 (file)
@@ -1,3 +1,4 @@
+300scope.vert\r
 ERROR: 0:5: 'a' : redefinition \r
 ERROR: 0:17: 'b' : redeclaration of existing name \r
 ERROR: 0:19: 'f' : redefinition \r
@@ -16,6 +17,7 @@ ERROR: 0:54: 'z' : undeclared identifier
 ERROR: 0:54: 'z' : redefinition \r
 ERROR: 16 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Function Definition: f(i1;i1;i1; (highp int)\r
 0:3    Function Parameters: \r
@@ -120,3 +122,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 6de5fef..0e7ce4d 100644 (file)
@@ -1,4 +1,6 @@
+330.frag\r
 Warning, version 330 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:8  Function Definition: main( (void)\r
 0:8    Function Parameters: \r
@@ -27,9 +29,19 @@ Warning, version 330 is not yet complete; some version-specific features are pre
 0:23            '__anon__0' (in block{gl_Color})\r
 0:23            Constant:\r
 0:23              0 (const uint)\r
+0:24      move second child to first child (4-component vector of float)\r
+0:24        'outVar' (out 4-component vector of float)\r
+0:24        'inVar' (smooth in 4-component vector of float)\r
 0:?   Linker Objects\r
 0:?     'inVar' (smooth in 4-component vector of float)\r
 0:?     'outVar' (out 4-component vector of float)\r
 0:?     'varyingVar' (smooth in 4-component vector of float)\r
 0:?     '__anon__0' (in block{gl_Color})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+ERROR: Linking fragment stage: Cannot use gl_FragColor or gl_FragData when using user-defined outputs\r
+ERROR: Linking fragment stage: Cannot use both gl_FragColor and gl_FragData\r
+\r
+\r
index dfe8dc7..3e8852f 100644 (file)
@@ -1,4 +1,6 @@
+330comp.frag\r
 Warning, version 330 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:8  Function Definition: main( (void)\r
 0:8    Function Parameters: \r
@@ -19,3 +21,9 @@ Warning, version 330 is not yet complete; some version-specific features are pre
 0:?     'outVar' (out 4-component vector of float)\r
 0:?     'varyingVar' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+ERROR: Linking fragment stage: Cannot use both gl_FragColor and gl_FragData\r
+\r
+\r
index 6f478f6..4ec13fd 100644 (file)
@@ -1,3 +1,4 @@
+400.frag\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:20: 'texture gather component' : must be a constant \r
 ERROR: 0:21: 'texture gather component' : must be 0, 1, 2, or 3 \r
@@ -8,6 +9,7 @@ ERROR: 0:39: 'redeclaration' : cannot change qualification of gl_ClipDistance
 ERROR: 0:41: 'gl_FragCoord' : cannot redeclare after use \r
 ERROR: 7 compilation errors.  No code generated.\r
 \r
+\r
 gl_FragCoord pixel center is integer\r
 gl_FragCoord origin is upper left\r
 ERROR: node is still EOpNull!\r
@@ -130,3 +132,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float)\r
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 9bef662..4884f6d 100644 (file)
@@ -1,3 +1,4 @@
+400.geom\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:13: 'invocations' : can only apply to a standalone qualifier \r
 ERROR: 0:24: 'length' :  array must be declared with a size before using this method\r
@@ -6,6 +7,7 @@ ERROR: 0:39: 'triangles' : inconsistent input primitive for array size colorBad
 ERROR: 0:43: 'triangles' : inconsistent input primitive for array size colorbad2\r
 ERROR: 5 compilation errors.  No code generated.\r
 \r
+\r
 invocations = 4\r
 max_vertices = 127\r
 input primitive = triangles\r
@@ -65,3 +67,8 @@ ERROR: node is still EOpNull!
 0:?     'colorBad' (in 4-element array of 4-component vector of float)\r
 0:?     'colorbad2' (in 2-element array of 4-component vector of float)\r
 \r
+\r
+Linked geometry stage:\r
+\r
+\r
+\r
index e02d4d1..e598a2c 100644 (file)
@@ -1,4 +1,6 @@
+400.tesc\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:3  Function Definition: main( (void)\r
 0:3    Function Parameters: \r
@@ -6,3 +8,8 @@ Warning, version 400 is not yet complete; some version-specific features are pre
 0:5      Barrier (void)\r
 0:?   Linker Objects\r
 \r
+\r
+Linked tessellation control stage:\r
+\r
+\r
+\r
index 27c716c..918c6da 100644 (file)
@@ -1,7 +1,9 @@
+400.tese\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:5: 'barrier' : no matching overloaded function found \r
 ERROR: 1 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Function Definition: main( (void)\r
 0:3    Function Parameters: \r
@@ -10,3 +12,8 @@ ERROR: node is still EOpNull!
 0:5        0.000000\r
 0:?   Linker Objects\r
 \r
+\r
+Linked tessellation evaluation stage:\r
+\r
+\r
+\r
index 0b3acd8..1ff66f3 100644 (file)
@@ -1,3 +1,4 @@
+410.geom\r
 Warning, version 410 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:8: 'myIn' : cannot redeclare a built-in block with a user name \r
 ERROR: 0:8: 'gl_' : reserved built-in name \r
@@ -6,6 +7,7 @@ ERROR: 0:20: 'gl_PerVertex' : can only redeclare a built-in block once, and befo
 ERROR: 0:20: 'gl_' : reserved built-in name \r
 ERROR: 5 compilation errors.  No code generated.\r
 \r
+\r
 invocations = 0\r
 max_vertices = 0\r
 input primitive = none\r
@@ -41,3 +43,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_in' (in unsized array of block{gl_PointSize})\r
 0:?     '__anon__0' (layout(stream=0 ) out block{gl_PointSize})\r
 \r
+\r
+Linked geometry stage:\r
+\r
+\r
+\r
index d06a7d6..d8dcf19 100644 (file)
@@ -1,3 +1,4 @@
+420.geom\r
 Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:9: 'length' :  array must be declared with a size before using this method\r
 ERROR: 0:11: '[' :  array must be redeclared with a size before being indexed with a variable\r
@@ -5,6 +6,7 @@ ERROR: 0:42: 'assign' :  l-value required (can't modify a const)
 ERROR: 0:43: 'assign' :  l-value required "v4" (can't modify a uniform)\r
 ERROR: 4 compilation errors.  No code generated.\r
 \r
+\r
 invocations = 0\r
 max_vertices = 0\r
 input primitive = triangles\r
@@ -114,3 +116,9 @@ ERROR: node is still EOpNull!
 0:?     'coord' (in 2-component vector of float)\r
 0:?     'v4' (uniform 4-component vector of float)\r
 \r
+\r
+Linked geometry stage:\r
+\r
+ERROR: Linking geometry stage: Missing entry point: Each stage requires one "void main()" entry point\r
+\r
+\r
index fe778bc..950517e 100644 (file)
@@ -1,3 +1,4 @@
+420.tese\r
 Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:7: '=' :  cannot convert from '3-element array of float' to '2-element array of float'\r
 ERROR: 0:8: 'initializer list' : wrong vector size (or rows in a matrix column): 2-component vector of float\r
@@ -14,6 +15,7 @@ ERROR: 0:40: 'constructor' :  cannot convert parameter 1 from 'float' to 'struct
 ERROR: 0:58: 'initializer list' : wrong number of structure members \r
 ERROR: 13 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:4  Sequence\r
 0:4    move second child to first child (2X2 matrix of float)\r
@@ -155,3 +157,8 @@ ERROR: node is still EOpNull!
 0:?     'av3' (3-component vector of float)\r
 0:?     'bv3' (3-component vector of float)\r
 \r
+\r
+Linked tessellation evaluation stage:\r
+\r
+\r
+\r
index 7af5abb..8f6816a 100644 (file)
@@ -1,3 +1,4 @@
+420.vert\r
 Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
 ERROR: 0:3: 'varying' : no longer supported in core profile; removed in version 420\r
@@ -26,6 +27,7 @@ ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier
 ERROR: 0:71: 'binding' : binding is too large \r
 ERROR: 24 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:20  Function Definition: foo( (const int)\r
 0:20    Function Parameters: \r
@@ -125,3 +127,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index e1f238a..fc4f4ed 100644 (file)
@@ -1,7 +1,9 @@
+430.comp\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:12: 'location qualifier on input' : not supported in this stage: compute\r
 ERROR: 1 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Function Definition: main( (void)\r
 0:3    Function Parameters: \r
@@ -14,3 +16,8 @@ ERROR: node is still EOpNull!
 0:?   Linker Objects\r
 0:?     'v3' (layout(location=2 ) in 3-component vector of float)\r
 \r
+\r
+Linked compute stage:\r
+\r
+\r
+\r
index 8500615..54d8060 100644 (file)
@@ -1,3 +1,4 @@
+430.vert\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:3: 'v4' : location qualifiers only appy to uniform, buffer, in, or out storage qualifiers \r
 ERROR: 0:7: 'location qualifier on input block' : not supported for this version or the enabled extensions \r
@@ -12,6 +13,7 @@ ERROR: 0:30: '' : cannot use layout qualifiers on a function parameter
 ERROR: 0:31: '' : cannot use auxiliary or interpolation qualifiers on a function parameter \r
 ERROR: 11 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:14  Function Definition: foo( (void)\r
 0:14    Function Parameters: \r
@@ -41,3 +43,9 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+ERROR: Linking vertex stage: Missing entry point: Each stage requires one "void main()" entry point\r
+\r
+\r
index 4776db8..c87f3ee 100644 (file)
@@ -1,3 +1,4 @@
+430scope.vert\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:5: 'a' : redefinition \r
 ERROR: 0:17: 'b' : redeclaration of existing name \r
@@ -6,6 +7,7 @@ ERROR: 0:54: 'z' : undeclared identifier
 ERROR: 0:54: 'z' : redefinition \r
 ERROR: 5 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Function Definition: f(i1;i1;i1; (int)\r
 0:3    Function Parameters: \r
@@ -114,3 +116,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 434df49..e764d49 100644 (file)
@@ -1,4 +1,6 @@
+../../LunarGLASS/test/Operations.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
+\r
 0:? Sequence\r
 0:15  Function Definition: main( (void)\r
 0:15    Function Parameters: \r
@@ -431,3 +433,8 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:?     'uf' (uniform float)\r
 0:?     'ui' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 382d30d..711982c 100644 (file)
@@ -1,6 +1,8 @@
+../../LunarGLASS/test/aggOps.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:6: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:23  Function Definition: main( (void)\r
 0:23    Function Parameters: \r
@@ -145,3 +147,8 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas
 0:?     'foo2a' (uniform structure{i,f,s1_1})\r
 0:?     'foo2b' (uniform structure{i,f,s1_1})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 579e3ec..99f2465 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/always-discard.frag\r
+\r
 0:? Sequence\r
 0:4  Function Definition: main( (void)\r
 0:4    Function Parameters: \r
 0:?   Linker Objects\r
 0:?     'tex_coord' (smooth in 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 401fab7..fe9c9c3 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/always-discard2.frag\r
+\r
 0:? Sequence\r
 0:4  Function Definition: main( (void)\r
 0:4    Function Parameters: \r
@@ -55,3 +57,8 @@
 0:?   Linker Objects\r
 0:?     'tex_coord' (smooth in 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e2046f8..91208e8 100644 (file)
@@ -1,3 +1,4 @@
+array.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 ERROR: 0:21: '[' :  array index out of range '2'\r
 ERROR: 0:27: '[' :  array must be redeclared with a size before being indexed with a variable\r
@@ -15,6 +16,7 @@ ERROR: 0:57: '[' :  index out of range '-858993459'
 ERROR: 0:58: '[]' : scalar integer expression required \r
 ERROR: 14 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:9  Function Definition: foo(f1[5]; (4-element array of float)\r
 0:9    Function Parameters: \r
@@ -186,3 +188,8 @@ ERROR: node is still EOpNull!
 0:?     'g5' (5-element array of float)\r
 0:?     'a' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 8223f4b..5e12a74 100644 (file)
@@ -1,3 +1,4 @@
+array100.frag\r
 ERROR: 0:3: 'float' : type requires declaration of default precision qualifier \r
 ERROR: 0:3: '' : array size required \r
 ERROR: 0:9: 'arrayed type' : not supported for this version or the enabled extensions \r
@@ -22,6 +23,7 @@ ERROR: 0:68: 'array assignment' : not supported for this version or the enabled
 ERROR: 0:69: 'array initializer' : not supported for this version or the enabled extensions \r
 ERROR: 22 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:9  Function Definition: foo(f1[5]; (4-element array of mediump float)\r
 0:9    Function Parameters: \r
@@ -154,3 +156,8 @@ ERROR: node is still EOpNull!
 0:?     'g5' (5-element array of mediump float)\r
 0:?     'a' (uniform mediump int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 48e85c6..0daf757 100644 (file)
@@ -1,7 +1,14 @@
+comment.frag\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:17  Function Definition: main( (void)\r
 0:17    Function Parameters: \r
 0:?   Linker Objects\r
 0:?     'v' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index a4c3e6c..f3df2e7 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/conditionalDiscard.frag\r
+\r
 0:? Sequence\r
 0:6  Function Definition: main( (void)\r
 0:6    Function Parameters: \r
@@ -26,3 +28,8 @@
 0:?     'tex' (uniform sampler2D)\r
 0:?     'coord' (smooth in 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index c099f84..21e394a 100644 (file)
@@ -1,3 +1,4 @@
+constErrors.frag\r
 Warning, version 330 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:14: 'non-constant initializer' : not supported for this version or the enabled extensions \r
 ERROR: 0:17: '' : constant expression required \r
@@ -10,6 +11,7 @@ ERROR: 0:27: '=' : global const initializers must be constant 'const structure{v
 ERROR: 0:33: '=' : global const initializers must be constant 'const structure{v3,iv2,m}'\r
 ERROR: 9 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:10  Function Definition: main( (void)\r
 0:10    Function Parameters: \r
@@ -29,3 +31,8 @@ ERROR: node is still EOpNull!
 0:?     'f' (const float)\r
 0:?       3.000000\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 0147f7c..c2fb580 100644 (file)
@@ -1,3 +1,4 @@
+constFold.frag\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:109: '[' :  index out of range '-1'\r
 ERROR: 0:110: '[' :  vector index out of range '4'\r
@@ -7,6 +8,7 @@ ERROR: 0:113: '[' :  vector index out of range '3'
 ERROR: 0:114: '[' :  matrix index out of range '3'\r
 ERROR: 6 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:28  Function Definition: main( (void)\r
 0:28    Function Parameters: \r
@@ -303,3 +305,8 @@ ERROR: node is still EOpNull!
 0:?       5.000000\r
 0:?     'a4' (2-element array of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index ec3d2f6..b6f480a 100644 (file)
@@ -1,4 +1,6 @@
+../../LunarGLASS/test/conversion.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
+\r
 0:? Sequence\r
 0:33  Function Definition: main( (void)\r
 0:33    Function Parameters: \r
@@ -473,3 +475,8 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:?     'i_f3' (smooth in 3-component vector of float)\r
 0:?     'i_f4' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index d2f787e..67a93e4 100644 (file)
@@ -1,9 +1,11 @@
+cppComplexExpr.vert\r
 ERROR: 0:46: 'xyxwx' : illegal vector field selection \r
 ERROR: 0:46: 'xyxwx' : illegal vector field selection \r
 ERROR: 0:66: '#define' : Macro redefined; different substitutions: BIG\r
 ERROR: 0:79: '' : missing #endif \r
 ERROR: 4 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:4  Sequence\r
 0:4    move second child to first child (highp float)\r
@@ -69,3 +71,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 221640e..f6d8d0f 100644 (file)
@@ -1,3 +1,5 @@
+cppIndent.vert\r
+\r
 0:? Sequence\r
 0:5  Sequence\r
 0:5    move second child to first child (float)\r
@@ -34,3 +36,8 @@
 0:?   Linker Objects\r
 0:?     'sum' (float)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 95f28f4..c9406ba 100644 (file)
@@ -1,3 +1,5 @@
+cppNest.vert\r
+\r
 0:? Sequence\r
 0:5  Sequence\r
 0:5    move second child to first child (float)\r
@@ -56,3 +58,8 @@
 0:?     'selected2' (int)\r
 0:?     'selected3' (int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index a5d18f2..8d8ff79 100644 (file)
@@ -1,3 +1,4 @@
+cppSimple.vert\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:77: '#error' : good1  \r
 ERROR: 0:81: '#error' : good2  \r
@@ -46,6 +47,7 @@ ERROR: 0:205: '#undef' : can't use with built-in names ("GL_" prefix)
 ERROR: 0:209: '' : missing #endif \r
 ERROR: 45 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:5  Sequence\r
 0:5    move second child to first child (float)\r
@@ -132,3 +134,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index dbceed6..311c10d 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/dataOut.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:5  Function Definition: main( (void)\r
 0:5    Function Parameters: \r
@@ -13,3 +15,8 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:?   Linker Objects\r
 0:?     'Color' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index b6e1c09..80c45cf 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/dataOutIndirect.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:7  Function Definition: main( (void)\r
 0:7    Function Parameters: \r
@@ -13,3 +15,8 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:?     'Color' (smooth in 4-component vector of float)\r
 0:?     'i' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 2b948b6..0a86180 100644 (file)
@@ -1,4 +1,6 @@
+dce.frag\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:5  Sequence\r
 0:5    move second child to first child (int)\r
@@ -132,3 +134,9 @@ Warning, version 400 is not yet complete; some version-specific features are pre
 0:?       false (const bool)\r
 0:?     'c' (int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point\r
+\r
+\r
index f965ed9..5181b50 100644 (file)
@@ -1,3 +1,4 @@
+decls.frag\r
 ERROR: 0:19: 'vi4' : illegal use of type 'void' \r
 ERROR: 0:20: 'vj' : illegal use of type 'void' \r
 ERROR: 0:20: 'vk5' : illegal use of type 'void' \r
@@ -18,6 +19,7 @@ ERROR: 0:42: '' : boolean expression expected
 ERROR: 0:43: 'gl_' : reserved built-in name \r
 ERROR: 18 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:5  Sequence\r
 0:5    move second child to first child (int)\r
@@ -214,3 +216,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_vn8' (4-element array of int)\r
 0:?     'gl_vp' (int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index a128194..b9f1f90 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/deepRvalue.frag\r
+\r
 0:? Sequence\r
 0:5  Sequence\r
 0:5    move second child to first child (4-component vector of float)\r
 0:?     'v3' (4-component vector of float)\r
 0:?     'v4' (4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index dc2bd1c..733be17 100644 (file)
@@ -1,6 +1,8 @@
+../../LunarGLASS/test/depthOut.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:8  Function Definition: main( (void)\r
 0:8    Function Parameters: \r
@@ -19,3 +21,9 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
 0:?     'Depth' (smooth in float)\r
 0:?     'foo' (out 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+ERROR: Linking fragment stage: Cannot use gl_FragColor or gl_FragData when using user-defined outputs\r
+\r
+\r
index 97f012b..35630f0 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/discard-dce.frag\r
+\r
 0:? Sequence\r
 0:4  Function Definition: main( (void)\r
 0:4    Function Parameters: \r
 0:?   Linker Objects\r
 0:?     'tex_coord' (smooth in 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 32956c4..331c35b 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/doWhileLoop.frag\r
+\r
 0:? Sequence\r
 0:7  Function Definition: main( (void)\r
 0:7    Function Parameters: \r
@@ -27,3 +29,8 @@
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'd' (uniform float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 288f55e..c712fbb 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/earlyReturnDiscard.frag\r
+\r
 0:? Sequence\r
 0:19  Function Definition: main( (void)\r
 0:19    Function Parameters: \r
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'b' (uniform bool)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 01c4603..dbf6300 100644 (file)
@@ -1,7 +1,9 @@
+errors.frag\r
 ERROR: 0:1: 'main' : function cannot take any parameter(s) \r
 ERROR: 0:1: 'int' :  main function cannot return a value\r
 ERROR: 2 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:1  Function Definition: main(i1; (mediump int)\r
 0:1    Function Parameters: \r
@@ -12,3 +14,8 @@ ERROR: node is still EOpNull!
 0:3          1 (const int)\r
 0:?   Linker Objects\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 606671d..3755e8d 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/flowControl.frag\r
+\r
 0:? Sequence\r
 0:10  Function Definition: main( (void)\r
 0:10    Function Parameters: \r
@@ -35,3 +37,8 @@
 0:?     'c' (smooth in float)\r
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 5db7911..08f3174 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/forLoop.frag\r
+\r
 0:? Sequence\r
 0:8  Function Definition: main( (void)\r
 0:8    Function Parameters: \r
@@ -33,3 +35,8 @@
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'Count' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index d63454a..4769eb9 100644 (file)
@@ -1,3 +1,5 @@
+forwardRef.frag\r
+\r
 0:? Sequence\r
 0:11  Function Definition: main( (void)\r
 0:11    Function Parameters: \r
@@ -57,3 +59,8 @@
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'd' (uniform float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e9a8af9..48f6a63 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/functionCall.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:7  Sequence\r
 0:7    move second child to first child (float)\r
@@ -87,3 +89,8 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
 0:?     'd' (uniform float)\r
 0:?     'h' (float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 2208bc1..4567870 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/functionSemantics.frag\r
+\r
 0:? Sequence\r
 0:3  Function Definition: foo(i1;i1;i1;i1;i1;i1; (mediump int)\r
 0:3    Function Parameters: \r
 0:35            'color' (mediump int)\r
 0:?   Linker Objects\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 0543e15..6f1699b 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/length.frag\r
+\r
 0:? Sequence\r
 0:11  Function Definition: main( (void)\r
 0:11    Function Parameters: \r
@@ -25,3 +27,8 @@
 0:?     'u' (uniform 3-element array of 4-component vector of float)\r
 0:?     'v' (smooth in 2-element array of 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 6c61ad8..0982a25 100644 (file)
@@ -1,8 +1,10 @@
+lineContinuation.vert\r
 ERROR: 0:6: '#error' : e1  \r
 ERROR: 0:11: '#error' : e2  \r
 ERROR: 0:18: '#error' : e3  \r
 ERROR: 3 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:20  Function Definition: main( (void)\r
 0:20    Function Parameters: \r
@@ -26,3 +28,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 9b890c5..9e20998 100644 (file)
@@ -1,3 +1,4 @@
+lineContinuation100.vert\r
 ERROR: 0:3: 'line continuation' : not supported for this version or the enabled extensions \r
 ERROR: 0:6: '#error' : e1  \r
 ERROR: 0:8: 'line continuation' : not supported for this version or the enabled extensions \r
@@ -9,6 +10,7 @@ ERROR: 0:18: '#error' : e3
 ERROR: 0:24: 'line continuation' : not supported for this version or the enabled extensions \r
 ERROR: 9 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:20  Function Definition: main( (void)\r
 0:20    Function Parameters: \r
@@ -30,3 +32,8 @@ ERROR: node is still EOpNull!
 0:?   Linker Objects\r
 0:?     'foo' (highp float)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 5dd201b..95e46f6 100644 (file)
@@ -1,6 +1,8 @@
+../../LunarGLASS/test/localAggregates.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:5: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:34  Function Definition: main( (void)\r
 0:34    Function Parameters: \r
@@ -203,3 +205,8 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas
 0:?     'uFloatArray' (uniform 16-element array of float)\r
 0:?     'condition' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 64cb131..db286d9 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/loops.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:14: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:53  Function Definition: main( (void)\r
 0:53    Function Parameters: \r
@@ -963,3 +965,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea
 0:?     'd34' (uniform float)\r
 0:?     'Count' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index ec6ec79..6a6aef8 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/loopsArtificial.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:14: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:53  Function Definition: main( (void)\r
 0:53    Function Parameters: \r
@@ -212,3 +214,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea
 0:?     'd34' (uniform float)\r
 0:?     'Count' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 2d794cf..c0ad3eb 100644 (file)
@@ -1,7 +1,9 @@
+../../LunarGLASS/test/matrix.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:6: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:17: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:22: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:25  Function Definition: main( (void)\r
 0:25    Function Parameters: \r
@@ -250,3 +252,8 @@ WARNING: 0:22: varying deprecated in version 130; may be removed in future relea
 0:?     'v' (smooth in 4-component vector of float)\r
 0:?     'u' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 976ef22..abcdbb0 100644 (file)
@@ -1,7 +1,9 @@
+../../LunarGLASS/test/matrix2.frag\r
 Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:13: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:15: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:19  Function Definition: main( (void)\r
 0:19    Function Parameters: \r
@@ -158,3 +160,8 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea
 0:?     'u' (smooth in 3-component vector of float)\r
 0:?     'FragColor' (out 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 1ac11f1..b3d120a 100644 (file)
@@ -1,3 +1,4 @@
+matrixError.vert\r
 ERROR: 0:10: 'constructor' : too many arguments \r
 ERROR: 0:7: 'const' : non-matching or non-convertible constant type for const initializer \r
 ERROR: 0:17: 'assign' :  cannot convert from '2-component vector of float' to '3-component vector of float'\r
@@ -7,6 +8,7 @@ ERROR: 0:21: '[' :  matrix index out of range '2'
 ERROR: 0:21: '[' :  vector index out of range '4'\r
 ERROR: 7 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:12  Function Definition: main( (void)\r
 0:12    Function Parameters: \r
@@ -34,3 +36,8 @@ ERROR: node is still EOpNull!
 0:?     'm32' (uniform 3X2 matrix of float)\r
 0:?     'm24' (2X4 matrix of float)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index fc4a36e..7ea2a81 100644 (file)
@@ -1,4 +1,6 @@
+../../LunarGLASS/test/newTexture.frag\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:34  Function Definition: main( (void)\r
 0:34    Function Parameters: \r
@@ -212,3 +214,8 @@ Warning, version 430 is not yet complete; some version-specific features are pre
 0:?     'ic4D' (flat in 4-component vector of int)\r
 0:?     'FragData' (out 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 6b1961d..23bb068 100644 (file)
@@ -1,3 +1,5 @@
+nonSquare.vert\r
+\r
 0:? Sequence\r
 0:15  Function Definition: main( (void)\r
 0:15    Function Parameters: \r
@@ -86,3 +88,8 @@
 0:?       7.000000\r
 0:?       8.000000\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 035c07b..f1c6196 100644 (file)
@@ -1,3 +1,4 @@
+numeral.frag\r
 Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:14: '' : octal literal digit too large \r
 ERROR: 0:15: '' : octal literal digit too large \r
@@ -11,6 +12,7 @@ ERROR: 0:50: '' : hexidecimal literal too big
 ERROR: 0:88: '' : float literal needs a decimal point or exponent \r
 ERROR: 10 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:3  Function Definition: main( (void)\r
 0:3    Function Parameters: \r
@@ -378,3 +380,8 @@ ERROR: node is still EOpNull!
 0:?     'c6' (layout(location=6 ) out 4-component vector of float)\r
 0:?     'c7' (layout(location=7 ) out 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 688c624..2813257 100644 (file)
@@ -1,3 +1,5 @@
+pointCoord.frag\r
+\r
 0:? Sequence\r
 0:5  Function Definition: main( (void)\r
 0:5    Function Parameters: \r
@@ -29,3 +31,8 @@
 0:?   Linker Objects\r
 0:?     'sampler' (uniform lowp sampler2D)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 59e30e2..54daf02 100644 (file)
@@ -1,3 +1,4 @@
+precision.frag\r
 ERROR: 0:3: 'float' : type requires declaration of default precision qualifier \r
 ERROR: 0:18: 'int' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type \r
 ERROR: 0:19: 'int' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type \r
@@ -7,6 +8,7 @@ ERROR: 0:75: 'structure' : cannot apply precision statement to this type; use 'f
 ERROR: 0:76: 'bool' : type cannot have precision qualifier \r
 ERROR: 7 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:5  Function Definition: foo(vf3; (lowp 2-component vector of float)\r
 0:5    Function Parameters: \r
@@ -121,3 +123,8 @@ ERROR: node is still EOpNull!
 0:?     'global_high' (highp int)\r
 0:?     'b2' (mediump 2-component vector of bool)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 8024291..529b628 100644 (file)
@@ -1,8 +1,10 @@
+precision.vert\r
 ERROR: 0:7: 'sampler/image' : type requires declaration of default precision qualifier \r
 ERROR: 0:8: 'sampler/image' : type requires declaration of default precision qualifier \r
 ERROR: 0:14: 'sampler/image' : type requires declaration of default precision qualifier \r
 ERROR: 3 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:18  Function Definition: main( (void)\r
 0:18    Function Parameters: \r
@@ -46,3 +48,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index a6b0fae..78fc83b 100644 (file)
@@ -1,4 +1,6 @@
+../../LunarGLASS/test/prepost.frag\r
 Warning, version 140 is not yet complete; most features are present, but a few are missing.\r
+\r
 0:? Sequence\r
 0:3  Function Definition: main( (void)\r
 0:3    Function Parameters: \r
@@ -131,3 +133,8 @@ Warning, version 140 is not yet complete; most features are present, but a few a
 0:37          'v' (4-component vector of float)\r
 0:?   Linker Objects\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 0e85f8e..ad427f7 100644 (file)
@@ -1,3 +1,5 @@
+sample.frag\r
+\r
 0:? Sequence\r
 0:38  Function Definition: main( (void)\r
 0:38    Function Parameters: \r
@@ -11,3 +13,8 @@
 0:?   Linker Objects\r
 0:?     'color' (smooth in 3-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e7942be..bd073fd 100644 (file)
@@ -1,3 +1,5 @@
+sample.vert\r
+\r
 0:? Sequence\r
 0:38  Function Definition: main( (void)\r
 0:38    Function Parameters: \r
@@ -16,3 +18,8 @@
 0:?   Linker Objects\r
 0:?     'color' (smooth out 3-component vector of float)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index b87a658..50fcb95 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/simpleFunctionCall.frag\r
 Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:7  Function Definition: foo( (4-component vector of float)\r
 0:7    Function Parameters: \r
@@ -17,3 +19,8 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'd' (uniform float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 92ceaf5..4668014 100644 (file)
@@ -1,3 +1,4 @@
+specExamples.frag\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:6: '=' :  cannot convert from 'const uint' to 'int'\r
 ERROR: 0:20: '' : numeric literal too big \r
@@ -49,6 +50,7 @@ ERROR: 0:228: 'in' : not allowed in nested scope
 ERROR: 0:232: 'out' : not allowed in nested scope \r
 ERROR: 48 compilation errors.  No code generated.\r
 \r
+\r
 gl_FragCoord pixel center is integer\r
 gl_FragCoord origin is upper left\r
 ERROR: node is still EOpNull!\r
@@ -295,3 +297,8 @@ ERROR: node is still EOpNull!
 0:?     '__anon__2' (in block{gl_FogFragCoord,gl_TexCoord,gl_Color,gl_SecondaryColor})\r
 0:?     '__anon__2' (in block{gl_FogFragCoord,gl_TexCoord,gl_Color,gl_SecondaryColor})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 2803903..29bc8c9 100644 (file)
@@ -1,3 +1,4 @@
+specExamples.vert\r
 Warning, version 430 is not yet complete; some version-specific features are present, but many are missing.\r
 ERROR: 0:23: 'transforms' : redeclaration of array with size \r
 ERROR: 0:29: 's' : location qualifiers only appy to uniform, buffer, in, or out storage qualifiers \r
@@ -44,6 +45,7 @@ ERROR: 0:193: 'constructor' : constructing from a non-dereferenced array
 ERROR: 0:194: 'constructor' : constructing from a non-dereferenced array \r
 ERROR: 42 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:134  Function Definition: funcA(I21; (4-component vector of float)\r
 0:134    Function Parameters: \r
@@ -314,3 +316,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 9779743..39d110b 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/structAssignment.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:29  Function Definition: main( (void)\r
 0:29    Function Parameters: \r
@@ -47,3 +49,8 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
 0:?     'foo2' (uniform structure{i,f,s1_1})\r
 0:?     'foo3' (uniform structure{s2_1,i,f,s1_1})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 75b74e4..46b0e41 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/structDeref.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:41  Function Definition: main( (void)\r
 0:41    Function Parameters: \r
@@ -168,3 +170,8 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
 0:?     'foo3' (uniform structure{s2_1,i,f,s1_1})\r
 0:?     'foo00' (uniform structure{s0_0})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 53c7e96..5e1936f 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/structure.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:20  Function Definition: main( (void)\r
 0:20    Function Parameters: \r
@@ -78,3 +80,8 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:?     'foo' (uniform structure{i,f,color})\r
 0:?     'foo2' (uniform 5-element array of structure{i,f,s1_1})\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index a55f091..9e6b5f7 100644 (file)
@@ -1,3 +1,4 @@
+switch.frag\r
 ERROR: 0:11: 'switch' : condition must be a scalar integer expression \r
 ERROR: 0:14: 'switch' : condition must be a scalar integer expression \r
 ERROR: 0:21: 'switch' : last case/default label must be followed by statements \r
@@ -9,6 +10,7 @@ ERROR: 0:67: 'case' : constant expression required
 ERROR: 0:89: '' : break statement only allowed in switch and loops \r
 ERROR: 9 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:6  Function Definition: main( (void)\r
 0:6    Function Parameters: \r
@@ -192,3 +194,8 @@ ERROR: node is still EOpNull!
 0:?     'd' (uniform mediump int)\r
 0:?     'x' (smooth in highp float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e6b3a93..b4e22b2 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/swizzle.frag\r
+\r
 0:? Sequence\r
 0:9  Function Definition: main( (void)\r
 0:9    Function Parameters: \r
 0:?     'p' (uniform bool)\r
 0:?     't' (smooth in 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 54df813..40c1f5a 100644 (file)
@@ -1,10 +1,17 @@
+../../LunarGLASS/test/syntaxError.frag\r
 ERROR: 0:9: 'vec5' : undeclared identifier \r
 ERROR: 0:9: '' :  syntax error\r
 ERROR: 2 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:?   Linker Objects\r
 0:?     'bigColor' (uniform 4-component vector of float)\r
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'd' (uniform float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 74bf270..8e61b44 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/test.frag\r
+\r
 0:? Sequence\r
 0:13  Function Definition: main( (void)\r
 0:13    Function Parameters: \r
@@ -52,3 +54,8 @@
 0:?     't' (smooth in 2-component vector of float)\r
 0:?     'coords' (smooth in 3-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 07f01f9..544708d 100644 (file)
@@ -1,6 +1,8 @@
+../../LunarGLASS/test/texture.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:14: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:15: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:17  Function Definition: main( (void)\r
 0:17    Function Parameters: \r
@@ -280,3 +282,8 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea
 0:?     't' (smooth in 2-component vector of float)\r
 0:?     'coords2D' (smooth in 2-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index fb82cc3..a75d43b 100644 (file)
@@ -1,3 +1,4 @@
+tokenLength.vert\r
 ERROR: 0:9: '' : numeric literal too big \r
 ERROR: 0:10: '' : numeric literal too big \r
 ERROR: 0:13: '' : octal literal too big \r
@@ -14,6 +15,7 @@ ERROR: 0:36: '' : float literal too long
 ERROR: 0:36: '' : float literal too long \r
 ERROR: 14 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:9  Sequence\r
 0:9    move second child to first child (highp int)\r
@@ -105,3 +107,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId highp int)\r
 0:?     'gl_InstanceID' (gl_InstanceId highp int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 91b3f7f..cbd55e0 100644 (file)
@@ -1,4 +1,6 @@
+../../LunarGLASS/test/types.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
+\r
 0:? Sequence\r
 0:33  Function Definition: main( (void)\r
 0:33    Function Parameters: \r
@@ -334,3 +336,8 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:?     'i_f3' (smooth in 3-component vector of float)\r
 0:?     'i_f4' (smooth in 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 428df23..155aa9c 100644 (file)
@@ -1,3 +1,4 @@
+uint.frag\r
 ERROR: 0:2: 'uint' : must be qualified as flat in\r
 ERROR: 0:6: 'in' : cannot be bool \r
 ERROR: 0:20: 'const' : non-matching or non-convertible constant type for const initializer \r
@@ -9,6 +10,7 @@ ERROR: 0:51: '=' :  cannot convert from 'const int' to 'mediump uint'
 ERROR: 0:63: 'float' : type requires declaration of default precision qualifier \r
 ERROR: 9 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:15  Function Definition: main( (void)\r
 0:15    Function Parameters: \r
@@ -303,3 +305,8 @@ ERROR: node is still EOpNull!
 0:?     'c' (out mediump 4-component vector of uint)\r
 0:?     'usampler' (uniform lowp usampler2D)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e455809..6156ddb 100644 (file)
@@ -1,4 +1,6 @@
+../../LunarGLASS/test/uniformArray.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
+\r
 0:? Sequence\r
 0:7  Function Definition: main( (void)\r
 0:7    Function Parameters: \r
@@ -44,3 +46,8 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:?     'color' (uniform 6-element array of 4-component vector of float)\r
 0:?     'alpha' (uniform 16-element array of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index e7d2d2a..cbe8d05 100644 (file)
@@ -1,5 +1,7 @@
+../../LunarGLASS/test/variableArrayIndex.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:29  Function Definition: main( (void)\r
 0:29    Function Parameters: \r
@@ -108,3 +110,8 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:?     'foo3' (uniform structure{s2_1,i,f,s1_1})\r
 0:?     'Count' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 8ea2a01..e930a0d 100644 (file)
@@ -1,8 +1,10 @@
+../../LunarGLASS/test/varyingArray.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:6: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:8: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:10  Function Definition: main( (void)\r
 0:10    Function Parameters: \r
@@ -57,3 +59,8 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
 0:?     'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)\r
 0:?     'foo' (smooth in 3-element array of 4-component vector of float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 087c6a5..b23fb63 100644 (file)
@@ -1,8 +1,10 @@
+../../LunarGLASS/test/varyingArrayIndirect.frag\r
 Warning, version 130 is not yet complete; most features are present, but a few are missing.\r
 WARNING: 0:3: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:4: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:6: varying deprecated in version 130; may be removed in future release\r
 WARNING: 0:8: varying deprecated in version 130; may be removed in future release\r
+\r
 0:? Sequence\r
 0:12  Function Definition: main( (void)\r
 0:12    Function Parameters: \r
@@ -60,3 +62,8 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
 0:?     'a' (uniform int)\r
 0:?     'b' (uniform int)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 783d469..1a73847 100644 (file)
@@ -1,7 +1,9 @@
+versionsClean.frag\r
 ERROR: #version: statement must appear first in es-profile shader; before comments or newlines\r
 ERROR: 0:34: '#version' : must occur first in shader \r
 ERROR: 2 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:41  Function Definition: main( (void)\r
 0:41    Function Parameters: \r
@@ -18,3 +20,8 @@ ERROR: node is still EOpNull!
 0:?     'foo' (out highp 4-component vector of float)\r
 0:?     'bar' (uniform highp sampler2DArrayShadow)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 8d83c61..b996b2d 100644 (file)
@@ -1,4 +1,6 @@
+versionsClean.vert\r
 Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.\r
+\r
 0:? Sequence\r
 0:40  Function Definition: main( (void)\r
 0:40    Function Parameters: \r
@@ -18,3 +20,8 @@ Warning, version 420 is not yet complete; some version-specific features are pre
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index cde4e28..034e065 100644 (file)
@@ -1,3 +1,4 @@
+versionsErrors.frag\r
 ERROR: #version: versions before 150 do not allow a profile token\r
 ERROR: 0:38: 'attribute' : not supported in this stage: fragment\r
 ERROR: 0:40: 'sampler2DRect' : Reserved word. \r
@@ -5,6 +6,7 @@ ERROR: 0:40: 'rectangle texture' : not supported for this version or the enabled
 ERROR: 0:44: 'floating-point suffix' : not supported for this version or the enabled extensions \r
 ERROR: 5 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:42  Function Definition: main( (void)\r
 0:42    Function Parameters: \r
@@ -20,3 +22,8 @@ ERROR: node is still EOpNull!
 0:?     'color' (smooth in 3-component vector of float)\r
 0:?     'foo' (uniform sampler2DRect)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 0b6ac18..f3f51f5 100644 (file)
@@ -1,9 +1,11 @@
+versionsErrors.vert\r
 Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.\r
 WARNING: 0:38: attribute deprecated in version 130; may be removed in future release\r
 ERROR: 0:38: 'attribute' : no longer supported in core profile; removed in version 420\r
 ERROR: 0:45: 'discard' : not supported in this stage: vertex\r
 ERROR: 2 compilation errors.  No code generated.\r
 \r
+\r
 ERROR: node is still EOpNull!\r
 0:42  Function Definition: main( (void)\r
 0:42    Function Parameters: \r
@@ -24,3 +26,8 @@ ERROR: node is still EOpNull!
 0:?     'gl_VertexID' (gl_VertexId int)\r
 0:?     'gl_InstanceID' (gl_InstanceId int)\r
 \r
+\r
+Linked vertex stage:\r
+\r
+\r
+\r
index 4b62cd2..2a408ff 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/voidFunction.frag\r
+\r
 0:? Sequence\r
 0:7  Sequence\r
 0:7    move second child to first child (float)\r
@@ -40,3 +42,8 @@
 0:?     'd' (uniform float)\r
 0:?     'bar' (float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 7b25a0c..fc1377e 100644 (file)
@@ -1,3 +1,5 @@
+../../LunarGLASS/test/whileLoop.frag\r
+\r
 0:? Sequence\r
 0:7  Function Definition: main( (void)\r
 0:7    Function Parameters: \r
@@ -27,3 +29,8 @@
 0:?     'BaseColor' (smooth in 4-component vector of float)\r
 0:?     'd' (uniform float)\r
 \r
+\r
+Linked fragment stage:\r
+\r
+\r
+\r
index 9263304..63cbd6b 100755 (executable)
@@ -10,7 +10,7 @@ EXE=./glslangValidator.exe
 echo running configuration file test
 $EXE -c > $TARGETDIR/test.conf
 diff -b $BASEDIR/test.conf $TARGETDIR/test.conf
-$EXE -i $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
+$EXE -i -l $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
 diff -b $BASEDIR/specExamples.vert.out $TARGETDIR
 $EXE 100Limits.vert 100.conf >  $TARGETDIR/100LimitsConf.vert.out
 diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out
@@ -21,7 +21,7 @@ diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out
 while read t; do
     echo Running $t...
     b=`basename $t`
-    $EXE -i $t > $TARGETDIR/$b.out
+    $EXE -i -l $t > $TARGETDIR/$b.out
     diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
 done < testlist
 
index 3438316..462863a 100644 (file)
--- a/Todo.txt
+++ b/Todo.txt
@@ -33,8 +33,8 @@ Link Validation
       - Non ES: binding overlap?
       - Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords
       + Non ES: geometry shader input array sizes and input layout qualifier declaration
-      - Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
-      - Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
+      + Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
+      + Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
       + 1.50: match between all explicit input array sizes and input primitive
       - 1.50: at least one geometry shader says input primitive and at least one says output primitive...
       - 1.50: at least one geometry shader says max_vertices...
index 5050862..06e93cf 100644 (file)
@@ -312,6 +312,29 @@ public:
         }
     }
 
+    bool isIo() const
+    {
+        switch (storage) {
+        case EvqUniform:
+        case EvqBuffer:
+        case EvqVaryingIn:
+        case EvqFragCoord:
+        case EvqPointCoord:
+        case EvqFace:
+        case EvqVertexId:
+        case EvqInstanceId:
+        case EvqPosition:
+        case EvqPointSize:
+        case EvqClipVertex:
+        case EvqVaryingOut:
+        case EvqFragColor:
+        case EvqFragDepth:
+            return true;
+        default:
+            return false;
+        }
+    }
+
     // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
     void clearLayout()
     {
index 24b224a..9aa56a7 100644 (file)
@@ -54,7 +54,7 @@ TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, bool pb,
             contextPragma(true, false), loopNestingLevel(0), structNestingLevel(0),
             tokensBeforeEOF(false), currentScanner(0),
             numErrors(0), parsingBuiltins(pb), afterEOF(false),
-            anyIndexLimits(false), fragCoordUsedBeforeRedeclaration(false)
+            anyIndexLimits(false)
 {
     // ensure we always have a linkage node, even if empty, to simplify tree topology algorithms
     linkage = new TIntermAggregate;
@@ -387,6 +387,7 @@ void C_DECL TParseContext::warn(TSourceLoc loc, const char *szReason, const char
 TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TString* string)
 {
     TIntermTyped* node = 0;
+    bool noteAccess = false;
 
     // Error check for function requiring specific extensions present.
     if (symbol && symbol->getNumExtensions())
@@ -403,6 +404,10 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TSt
 
         node = intermediate.addIndex(EOpIndexDirectStruct, container, constNode, loc);
         node->setType(*(*variable->getType().getStruct())[anon->getMemberNumber()].type);
+        if (variable->getType().getQualifier().isIo())
+            noteAccess = true;
+
+        // TODO: does this create any accidental type sharing with the built-in level?
     } else {
         // The symbol table search was done in the lexical phase, but
         // if this is a new symbol, it wouldn't have found it.
@@ -419,18 +424,19 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TSt
             TType* type;
             if (variable->isReadOnly()) {
                 type = new TType;
-                // break type sharing with built-ins
+                // break type sharing with built-ins; only costs if there are arrays or structures
                 type->deepCopy(variable->getType());
-
-                // track use of unredeclared gl_FragCoord
-                if (variable->getName() == "gl_FragCoord")
-                    fragCoordUsedBeforeRedeclaration = true;
             } else
                 type = &variable->getWritableType();
             node = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), *type, loc);
+            if (type->getQualifier().isIo())
+                noteAccess = true;
         }
     }
 
+    if (noteAccess)
+        intermediate.addIoAccessed(*string);
+
     return node;
 }
 
@@ -2069,10 +2075,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(TSourceLoc loc, const TString&
                 symbolQualifier.storage != qualifier.storage)
                 error(loc, "cannot change qualification of", "redeclaration", symbol->getName().c_str());
         } else if (identifier == "gl_FragCoord") {
-            if (fragCoordUsedBeforeRedeclaration)
+            if (intermediate.inIoAccessed("gl_FragCoord"))
                 error(loc, "cannot redeclare after use", "gl_FragCoord", "");
-                // Note: this did not catch the case of 1) declare, 2) use, 3) declare again, because the "use" was of a redeclaration, and so didn't set fragCoordUsedBeforeRedeclaration.
-                // (and that's what the rules are too, as long as #3 matches #1)
             if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat ||
                 qualifier.isMemory() || qualifier.isAuxiliary())
                 error(loc, "can only change layout qualification of", "redeclaration", symbol->getName().c_str());
@@ -3425,6 +3429,8 @@ void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier,
         symbol = symbolTable.copyUp(symbol);
 
     if (qualifier.invariant) {
+        if (intermediate.inIoAccessed(identifier))
+            error(loc, "cannot change qualification after use", "invariant", "");
         symbol->getWritableType().getQualifier().invariant = true;
         invariantCheck(loc, symbol->getType(), identifier);
     }
index 81426be..f96c005 100644 (file)
@@ -251,7 +251,6 @@ protected:
     TIdSetType inductiveLoopIds;
     bool anyIndexLimits;
     TVector<TIntermTyped*> needsIndexLimitationChecking;
-    bool fragCoordUsedBeforeRedeclaration;
 
     //
     // Geometry shader input arrays:
index 55bfdc6..f170a15 100644 (file)
@@ -96,6 +96,8 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
 \r
     mergeBodies(infoSink, globals, unitGlobals);\r
     mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);\r
+\r
+    ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());\r
 }\r
 \r
 //\r
@@ -249,6 +251,14 @@ void TIntermediate::errorCheck(TInfoSink& infoSink)
 \r
     // overlap/alias/missing I/O, etc.\r
     inOutLocationCheck(infoSink);\r
+\r
+    if (inIoAccessed("gl_ClipDistance") && inIoAccessed("gl_ClipVertex"))\r
+        error(infoSink, "Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)");\r
+\r
+    if (userOutputUsed() && (inIoAccessed("gl_FragColor") || inIoAccessed("gl_FragData")))\r
+        error(infoSink, "Cannot use gl_FragColor or gl_FragData when using user-defined outputs");\r
+    if (inIoAccessed("gl_FragColor") && inIoAccessed("gl_FragData"))\r
+        error(infoSink, "Cannot use both gl_FragColor and gl_FragData");\r
 }\r
 \r
 //\r
@@ -365,7 +375,7 @@ void TIntermediate::inOutLocationCheck(TInfoSink& infoSink)
     }        \r
 }\r
 \r
-TIntermSequence& TIntermediate::findLinkerObjects()\r
+TIntermSequence& TIntermediate::findLinkerObjects() const\r
 {\r
     // Get the top-level globals\r
     TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence();\r
@@ -376,4 +386,25 @@ TIntermSequence& TIntermediate::findLinkerObjects()
     return globals.back()->getAsAggregate()->getSequence();\r
 }\r
 \r
+// See if a variable was both a user-declared output and used.\r
+// Note: the spec discusses writing to one, but this looks at read or write, which \r
+// is more useful, and perhaps the spec should be changed to reflect that.\r
+bool TIntermediate::userOutputUsed() const\r
+{\r
+    const TIntermSequence& linkerObjects = findLinkerObjects();\r
+\r
+    bool found = false;\r
+    for (size_t i = 0; i < linkerObjects.size(); ++i) {\r
+        const TIntermSymbol& symbolNode = *linkerObjects[i]->getAsSymbolNode();\r
+        if (symbolNode.getQualifier().storage == EvqVaryingOut &&\r
+            symbolNode.getName().compare(0, 3, "gl_") != 0 &&\r
+            inIoAccessed(symbolNode.getName())) {            \r
+            found = true;\r
+            break;\r
+        }\r
+    }\r
+\r
+    return found;\r
+}\r
+\r
 } // end namespace glslang\r
index 95c20ba..c3213ef 100644 (file)
@@ -40,6 +40,7 @@
 #include "Versions.h"
 
 #include <algorithm>
+#include <set>
 
 class TInfoSink;
 
@@ -143,6 +144,9 @@ public:
     void merge(TInfoSink&, TIntermediate&);
     void errorCheck(TInfoSink&);
 
+    void addIoAccessed(const TString& name) { ioAccessed.insert(name); }
+    bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); }
+
     void outputTree(TInfoSink&);
        void removeTree();
 
@@ -153,7 +157,8 @@ protected:
     void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage);
     void checkCallGraphCycles(TInfoSink&);
     void inOutLocationCheck(TInfoSink&);
-    TIntermSequence& findLinkerObjects();
+    TIntermSequence& findLinkerObjects() const;
+    bool userOutputUsed() const;
 
 protected:
     const EShLanguage language;
@@ -179,9 +184,11 @@ protected:
         bool currentPath;
         bool errorGiven;
     };
-    typedef std::list<TCall> TGraph;
+    typedef TList<TCall> TGraph;
     TGraph callGraph;
 
+    std::set<TString> ioAccessed;  // set of names of statically read/written I/O that might need extra checking
+
 private:
     void operator=(TIntermediate&); // prevent assignments
 };