glslang front-end: Full turn-on of AEP tessellation semantics.
authorJohn Kessenich <cepheus@frii.com>
Fri, 19 Jun 2015 23:03:32 +0000 (23:03 +0000)
committerJohn Kessenich <cepheus@frii.com>
Fri, 19 Jun 2015 23:03:32 +0000 (23:03 +0000)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31538 e7fa87d3-cd2b-0410-9028-fcbf551c1848

18 files changed:
Test/310.tesc [new file with mode: 0644]
Test/310.tese [new file with mode: 0644]
Test/400.tesc
Test/400.tese
Test/baseResults/310.frag.out
Test/baseResults/310.tesc.out [new file with mode: 0644]
Test/baseResults/310.tese.out [new file with mode: 0644]
Test/baseResults/310.vert.out
Test/baseResults/330.frag.out
Test/baseResults/420.vert.out
Test/baseResults/430.vert.out
Test/baseResults/440.frag.out
Test/testlist
glslang/MachineIndependent/Initialize.cpp
glslang/MachineIndependent/ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.h
glslang/MachineIndependent/Scan.cpp
glslang/MachineIndependent/Versions.cpp

diff --git a/Test/310.tesc b/Test/310.tesc
new file mode 100644 (file)
index 0000000..d35014a
--- /dev/null
@@ -0,0 +1,121 @@
+#version 310 es\r
+\r
+#extension GL_OES_tessellation_shader : enable\r
+\r
+layout(vertices = 4) out;\r
+int outa[gl_out.length()];\r
+\r
+layout(quads) in;                   // ERROR\r
+layout(ccw) out;                    // ERROR\r
+layout(fractional_even_spacing) in; // ERROR\r
+\r
+patch in vec4 patchIn;              // ERROR\r
+patch out vec4 patchOut;\r
+\r
+void main()\r
+{\r
+    barrier();\r
+\r
+    int a = gl_MaxTessControlInputComponents +\r
+            gl_MaxTessControlOutputComponents +\r
+            gl_MaxTessControlTextureImageUnits +\r
+            gl_MaxTessControlUniformComponents +\r
+            gl_MaxTessControlTotalOutputComponents;\r
+\r
+    vec4 p = gl_in[1].gl_Position;\r
+    float ps = gl_in[1].gl_PointSize;\r
+    float cd = gl_in[1].gl_ClipDistance[2];  // ERROR, not in ES\r
+\r
+    int pvi = gl_PatchVerticesIn;\r
+    int pid = gl_PrimitiveID;\r
+    int iid = gl_InvocationID;\r
+\r
+    gl_out[1].gl_Position = p;\r
+    gl_out[1].gl_PointSize = ps;\r
+    gl_out[1].gl_ClipDistance[1] = cd;  // ERROR, not in ES\r
+\r
+    gl_TessLevelOuter[3] = 3.2;\r
+    gl_TessLevelInner[1] = 1.3;\r
+\r
+    if (a > 10)\r
+        barrier();           // ERROR\r
+    else\r
+        barrier();           // ERROR\r
+\r
+    barrier();\r
+\r
+    do {\r
+        barrier();           // ERROR\r
+    } while (a > 10);\r
+\r
+    switch (a) {\r
+    default:\r
+        barrier();           // ERROR\r
+        break;\r
+    }\r
+    a < 12 ? a : (barrier(), a); // ERROR\r
+    {\r
+        barrier();\r
+    }\r
+\r
+    return;\r
+\r
+    barrier();               // ERROR\r
+}\r
+\r
+layout(vertices = 4) in;    // ERROR, not on in\r
+layout(vertices = 5) out;   // ERROR, changing #\r
+\r
+void foo()\r
+{\r
+    gl_out[4].gl_Position;  // ERROR, out of range\r
+\r
+    barrier();              // ERROR, not in main\r
+}\r
+\r
+in vec2 ina;                // ERROR, not array\r
+in vec2 inb[];\r
+in vec2 inc[18];            // ERROR, wrong size\r
+in vec2 ind[gl_MaxPatchVertices];\r
+patch out float implA[];    // ERROR, not sized\r
+\r
+#extension GL_ARB_separate_shader_objects : enable\r
+\r
+layout(location = 3) in vec4 ivla[];\r
+layout(location = 4) in vec4 ivlb[];\r
+layout(location = 4) in vec4 ivlc[];  // ERROR, overlapping\r
+\r
+layout(location = 3) out vec4 ovla[];\r
+layout(location = 4) out vec4 ovlb[];\r
+layout(location = 4) out vec4 ovlc[];  // ERROR, overlapping\r
+\r
+void foop()\r
+{\r
+    precise float d;                  // ERROR without gpu_shader5\r
+    d = fma(d, d, d);                 // ERROR without gpu_shader5\r
+}\r
+\r
+patch out pinbn {\r
+    int a;\r
+} pinbi;\r
+\r
+centroid out vec3 myColor2[];\r
+centroid in vec3 centr[];\r
+sample out vec4 perSampleColor[];   // ERROR without sample extensions\r
+\r
+layout(vertices = 4) out float badlay[];   // ERROR, not on a variable\r
+out float misSized[5];              // ERROR, size doesn't match\r
+out float okaySize[4];\r
+\r
+// for testing with gpu_shader5\r
+//precise vec3 pv3;\r
+//\r
+//void foop()\r
+//{\r
+//    precise double d;\r
+//\r
+//    pv3 *= pv3;\r
+//    pv3 = fma(pv3, pv3, pv3);\r
+//    d = fma(d, d, d);\r
+//}\r
+//\r
diff --git a/Test/310.tese b/Test/310.tese
new file mode 100644 (file)
index 0000000..c0ac6e9
--- /dev/null
@@ -0,0 +1,113 @@
+#version 310 es\r
+\r
+#extension GL_EXT_tessellation_shader : enable\r
+#extension GL_OES_tessellation_shader : enable\r
+#extension GL_EXT_tessellation_shader : disable\r
+\r
+layout(vertices = 4) out; // ERROR\r
+layout(quads, cw) in;\r
+layout(triangles) in;     // ERROR\r
+layout(isolines) in;      // ERROR\r
+\r
+layout(ccw) in;           // ERROR\r
+layout(cw) in;\r
+\r
+layout(fractional_odd_spacing) in;    \r
+layout(equal_spacing) in;              // ERROR\r
+layout(fractional_even_spacing) in;    // ERROR\r
+\r
+layout(point_mode) in;\r
+\r
+patch in vec4 patchIn;\r
+patch out vec4 patchOut;  // ERROR\r
+\r
+void main()\r
+{\r
+    barrier(); // ERROR\r
+\r
+    int a = gl_MaxTessEvaluationInputComponents +\r
+            gl_MaxTessEvaluationOutputComponents +\r
+            gl_MaxTessEvaluationTextureImageUnits +\r
+            gl_MaxTessEvaluationUniformComponents +\r
+            gl_MaxTessPatchComponents +\r
+            gl_MaxPatchVertices +\r
+            gl_MaxTessGenLevel;\r
+\r
+    vec4 p = gl_in[1].gl_Position;\r
+    float ps = gl_in[1].gl_PointSize;\r
+    float cd = gl_in[1].gl_ClipDistance[2];  // ERROR, not in ES\r
+\r
+    int pvi = gl_PatchVerticesIn;\r
+    int pid = gl_PrimitiveID;\r
+    vec3 tc = gl_TessCoord;\r
+    float tlo = gl_TessLevelOuter[3];\r
+    float tli = gl_TessLevelInner[1];\r
+\r
+    gl_Position = p;\r
+    gl_PointSize = ps;\r
+    gl_ClipDistance[2] = cd;       // ERROR, not in ES\r
+}\r
+\r
+smooth patch in vec4 badp1;         // ERROR\r
+flat patch in vec4 badp2;           // ERROR\r
+noperspective patch in vec4 badp3;  // ERROR\r
+patch sample in vec3 badp4;         // ERROR\r
+\r
+#extension GL_ARB_separate_shader_objects : enable\r
+\r
+in gl_PerVertex           // ERROR, no size\r
+{\r
+    vec4 gl_Position;\r
+} gl_in[];\r
+\r
+in gl_PerVertex           // ERROR, second redeclaration of gl_in\r
+{\r
+    vec4 gl_Position;\r
+} gl_in[];\r
+\r
+layout(quads, cw) out;     // ERROR\r
+layout(triangles) out;     // ERROR\r
+layout(isolines) out;      // ERROR\r
+layout(cw) out;            // ERROR\r
+layout(fractional_odd_spacing) out;    // ERROR\r
+layout(equal_spacing) out;             // ERROR\r
+layout(fractional_even_spacing) out;   // ERROR\r
+layout(point_mode) out;                // ERROR\r
+\r
+in vec2 ina;      // ERROR, not array\r
+in vec2 inb[];\r
+in vec2 inc[18];  // ERROR, wrong size\r
+in vec2 ind[gl_MaxPatchVertices];\r
+\r
+in testbla {      // ERROR, not array\r
+    int f;\r
+} bla;\r
+\r
+in testblb {\r
+    int f;\r
+} blb[];\r
+\r
+in testblc { // ERROR wrong size\r
+    int f;\r
+} blc[18];\r
+\r
+in testbld {\r
+    int f;\r
+} bld[gl_MaxPatchVertices];\r
+\r
+layout(location = 23) in vec4 ivla[];\r
+layout(location = 24) in vec4 ivlb[];\r
+layout(location = 24) in vec4 ivlc[];  // ERROR, overlap\r
+\r
+layout(location = 23) out vec4 ovla[2];\r
+layout(location = 24) out vec4 ovlb[2];  // ERROR, overlap\r
+\r
+in float gl_TessLevelOuter[4];           // ERROR, can't redeclare\r
+\r
+patch in pinbn {\r
+    int a;\r
+} pinbi;\r
+\r
+centroid out vec3 myColor2;\r
+centroid in vec3 centr[];\r
+sample out vec4 perSampleColor;  // ERROR without sample extensions\r
index efbcbce..cf9ba51 100644 (file)
@@ -80,11 +80,11 @@ in vec2 ind[gl_MaxPatchVertices];
 \r
 layout(location = 3) in vec4 ivla[];\r
 layout(location = 4) in vec4 ivlb[];\r
-layout(location = 4) in vec4 ivlc[];  // ERROR\r
+layout(location = 4) in vec4 ivlc[];  // ERROR, overlapping\r
 \r
 layout(location = 3) out vec4 ovla[];\r
 layout(location = 4) out vec4 ovlb[];\r
-layout(location = 4) out vec4 ovlc[];  // ERROR\r
+layout(location = 4) out vec4 ovlc[];  // ERROR, overlapping\r
 \r
 precise vec3 pv3;\r
 \r
index 408d291..a1d3ed8 100644 (file)
@@ -51,14 +51,14 @@ patch sample in vec3 badp4;         // ERROR
 \r
 #extension GL_ARB_separate_shader_objects : enable\r
 \r
-in gl_PerVertex\r
+in gl_PerVertex            // ERROR, no size\r
 {\r
-float gl_ClipDistance[1];\r
-} gl_in[];                          // ERROR, no size\r
+    float gl_ClipDistance[1];\r
+} gl_in[];\r
 \r
-in gl_PerVertex\r
+in gl_PerVertex            // ERROR, second redeclaration of gl_in\r
 {\r
-float gl_ClipDistance[1];\r
+    float gl_ClipDistance[1];\r
 } gl_in[];\r
 \r
 layout(quads, cw) out;     // ERROR\r
@@ -98,7 +98,7 @@ layout(location = 24) in vec4 ivlc[];  // ERROR
 layout(location = 23) out vec4 ovla[2];\r
 layout(location = 24) out vec4 ovlb[2];  // ERROR\r
 \r
-in float gl_TessLevelOuter[4];           // ERROR\r
+in float gl_TessLevelOuter[4];           // ERROR, can't redeclare\r
 \r
 patch in pinbn {\r
     int a;\r
index f9c42e5..09c54fc 100644 (file)
@@ -41,7 +41,7 @@ ERROR: 0:120: 'fragment-shader array-of-struct input' : not supported with this
 ERROR: 0:121: 'fragment-shader array-of-struct input' : not supported with this profile: es\r
 ERROR: 0:123: 'fragment-shader struct input containing an array' : not supported with this profile: es\r
 ERROR: 0:125: 'fragment-shader struct input containing structure' : not supported with this profile: es\r
-ERROR: 0:133: 'out' : cannot declare an output block in a fragment shader \r
+ERROR: 0:133: 'output block' : not supported in this stage: fragment\r
 ERROR: 0:138: '' : cannot nest a structure definition inside a structure or block \r
 ERROR: 0:146: 'location' : overlapping use of location 13\r
 ERROR: 0:148: 'inbname2' : Cannot reuse block name within the same interface: in\r
diff --git a/Test/baseResults/310.tesc.out b/Test/baseResults/310.tesc.out
new file mode 100644 (file)
index 0000000..b1b2633
--- /dev/null
@@ -0,0 +1,388 @@
+310.tesc\r
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.\r
+ERROR: 0:8: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) \r
+ERROR: 0:9: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) \r
+ERROR: 0:10: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) \r
+ERROR: 0:12: 'patch' : can only use on output in tessellation-control shader \r
+ERROR: 0:27: 'gl_ClipDistance' : no such field in structure \r
+ERROR: 0:27: 'expression' :  left of '[' is not of type array, matrix, or vector  \r
+ERROR: 0:35: 'gl_ClipDistance' : no such field in structure \r
+ERROR: 0:35: 'expression' :  left of '[' is not of type array, matrix, or vector  \r
+ERROR: 0:35: 'assign' :  l-value required (can't modify a const)\r
+ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control \r
+ERROR: 0:43: '' : tessellation control barrier() cannot be placed within flow control \r
+ERROR: 0:48: '' : tessellation control barrier() cannot be placed within flow control \r
+ERROR: 0:53: '' : tessellation control barrier() cannot be placed within flow control \r
+ERROR: 0:56: '' : tessellation control barrier() cannot be placed within flow control \r
+ERROR: 0:63: '' : tessellation control barrier() cannot be placed after a return from main() \r
+ERROR: 0:66: 'vertices' : can only apply to 'out' \r
+ERROR: 0:67: 'vertices' : cannot change previously set layout value \r
+ERROR: 0:71: '[' :  array index out of range '4'\r
+ERROR: 0:73: '' : tessellation control barrier() must be in main() \r
+ERROR: 0:76: 'in' : type must be an array: ina\r
+ERROR: 0:78: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized \r
+ERROR: 0:80: '' : array size required \r
+ERROR: 0:86: 'location' : overlapping use of location 4\r
+ERROR: 0:90: 'location' : overlapping use of location 4\r
+ERROR: 0:94: 'precise' : Reserved word. \r
+ERROR: 0:95: 'fma' : no matching overloaded function found \r
+ERROR: 0:104: 'sample' : Reserved word. \r
+ERROR: 0:106: 'vertices' : can only apply to a standalone qualifier \r
+ERROR: 0:107: 'vertices' : inconsistent output number of vertices for array size of misSized\r
+ERROR: 29 compilation errors.  No code generated.\r
+\r
+\r
+Shader version: 310\r
+Requested GL_ARB_separate_shader_objects\r
+Requested GL_OES_shader_io_blocks\r
+Requested GL_OES_tessellation_shader\r
+vertices = 4\r
+ERROR: node is still EOpNull!\r
+0:15  Function Definition: main( (global void)\r
+0:15    Function Parameters: \r
+0:17    Sequence\r
+0:17      Barrier (global void)\r
+0:19      Sequence\r
+0:19        move second child to first child (temp highp int)\r
+0:19          'a' (temp highp int)\r
+0:19          Constant:\r
+0:19            5392 (const int)\r
+0:25      Sequence\r
+0:25        move second child to first child (temp highp 4-component vector of float)\r
+0:25          'p' (temp highp 4-component vector of float)\r
+0:25          gl_Position: direct index for structure (in highp 4-component vector of float)\r
+0:25            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:25              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:25              Constant:\r
+0:25                1 (const int)\r
+0:25            Constant:\r
+0:25              0 (const int)\r
+0:26      Sequence\r
+0:26        move second child to first child (temp highp float)\r
+0:26          'ps' (temp highp float)\r
+0:26          gl_PointSize: direct index for structure (in highp float)\r
+0:26            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:26              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:26              Constant:\r
+0:26                1 (const int)\r
+0:26            Constant:\r
+0:26              1 (const int)\r
+0:27      Sequence\r
+0:27        move second child to first child (temp highp float)\r
+0:27          'cd' (temp highp float)\r
+0:27          Constant:\r
+0:27            0.000000\r
+0:29      Sequence\r
+0:29        move second child to first child (temp highp int)\r
+0:29          'pvi' (temp highp int)\r
+0:29          'gl_PatchVerticesIn' (in highp int PatchVertices)\r
+0:30      Sequence\r
+0:30        move second child to first child (temp highp int)\r
+0:30          'pid' (temp highp int)\r
+0:30          'gl_PrimitiveID' (in highp int PrimitiveID)\r
+0:31      Sequence\r
+0:31        move second child to first child (temp highp int)\r
+0:31          'iid' (temp highp int)\r
+0:31          'gl_InvocationID' (in highp int InvocationID)\r
+0:33      move second child to first child (temp highp 4-component vector of float)\r
+0:33        gl_Position: direct index for structure (out highp 4-component vector of float Position)\r
+0:33          direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:33            'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:33            Constant:\r
+0:33              1 (const int)\r
+0:33          Constant:\r
+0:33            0 (const int)\r
+0:33        'p' (temp highp 4-component vector of float)\r
+0:34      move second child to first child (temp highp float)\r
+0:34        gl_PointSize: direct index for structure (out highp float PointSize)\r
+0:34          direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:34            'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:34            Constant:\r
+0:34              1 (const int)\r
+0:34          Constant:\r
+0:34            1 (const int)\r
+0:34        'ps' (temp highp float)\r
+0:35      move second child to first child (temp highp float)\r
+0:35        Constant:\r
+0:35          0.000000\r
+0:35        'cd' (temp highp float)\r
+0:37      move second child to first child (temp highp float)\r
+0:37        direct index (patch temp highp float TessLevelOuter)\r
+0:37          'gl_TessLevelOuter' (patch out 4-element array of highp float TessLevelOuter)\r
+0:37          Constant:\r
+0:37            3 (const int)\r
+0:37        Constant:\r
+0:37          3.200000\r
+0:38      move second child to first child (temp highp float)\r
+0:38        direct index (patch temp highp float TessLevelInner)\r
+0:38          'gl_TessLevelInner' (patch out 2-element array of highp float TessLevelInner)\r
+0:38          Constant:\r
+0:38            1 (const int)\r
+0:38        Constant:\r
+0:38          1.300000\r
+0:40      Test condition and select (temp void)\r
+0:40        Condition\r
+0:40        Compare Greater Than (temp bool)\r
+0:40          'a' (temp highp int)\r
+0:40          Constant:\r
+0:40            10 (const int)\r
+0:40        true case\r
+0:41        Barrier (global void)\r
+0:40        false case\r
+0:43        Barrier (global void)\r
+0:45      Barrier (global void)\r
+0:49      Loop with condition not tested first\r
+0:49        Loop Condition\r
+0:49        Compare Greater Than (temp bool)\r
+0:49          'a' (temp highp int)\r
+0:49          Constant:\r
+0:49            10 (const int)\r
+0:49        Loop Body\r
+0:48        Sequence\r
+0:48          Barrier (global void)\r
+0:51      switch\r
+0:51      condition\r
+0:51        'a' (temp highp int)\r
+0:51      body\r
+0:51        Sequence\r
+0:52          default: \r
+0:?           Sequence\r
+0:53            Barrier (global void)\r
+0:54            Branch: Break\r
+0:56      Test condition and select (temp highp int)\r
+0:56        Condition\r
+0:56        Compare Less Than (temp bool)\r
+0:56          'a' (temp highp int)\r
+0:56          Constant:\r
+0:56            12 (const int)\r
+0:56        true case\r
+0:56        'a' (temp highp int)\r
+0:56        false case\r
+0:56        Comma (temp highp int)\r
+0:56          Barrier (global void)\r
+0:56          'a' (temp highp int)\r
+0:58      Sequence\r
+0:58        Barrier (global void)\r
+0:61      Branch: Return\r
+0:63      Barrier (global void)\r
+0:69  Function Definition: foo( (global void)\r
+0:69    Function Parameters: \r
+0:71    Sequence\r
+0:71      gl_Position: direct index for structure (out highp 4-component vector of float Position)\r
+0:71        direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:71          'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:71          Constant:\r
+0:71            4 (const int)\r
+0:71        Constant:\r
+0:71          0 (const int)\r
+0:73      Barrier (global void)\r
+0:92  Function Definition: foop( (global void)\r
+0:92    Function Parameters: \r
+0:?     Sequence\r
+0:95      move second child to first child (temp highp float)\r
+0:95        'd' (temp highp float)\r
+0:95        Constant:\r
+0:95          0.000000\r
+0:?   Linker Objects\r
+0:?     'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:?     'outa' (global 4-element array of highp int)\r
+0:?     'patchIn' (patch in highp 4-component vector of float)\r
+0:?     'patchOut' (patch out highp 4-component vector of float)\r
+0:?     'ina' (in highp 2-component vector of float)\r
+0:?     'inb' (in 32-element array of highp 2-component vector of float)\r
+0:?     'inc' (in 32-element array of highp 2-component vector of float)\r
+0:?     'ind' (in 32-element array of highp 2-component vector of float)\r
+0:?     'implA' (patch out implicitly-sized array of highp float)\r
+0:?     'ivla' (layout(location=3 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlb' (layout(location=4 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlc' (layout(location=4 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ovla' (layout(location=3 ) out 4-element array of highp 4-component vector of float)\r
+0:?     'ovlb' (layout(location=4 ) out 4-element array of highp 4-component vector of float)\r
+0:?     'ovlc' (layout(location=4 ) out 4-element array of highp 4-component vector of float)\r
+0:?     'pinbi' (patch out block{out highp int a})\r
+0:?     'myColor2' (centroid out 4-element array of highp 3-component vector of float)\r
+0:?     'centr' (centroid in 32-element array of highp 3-component vector of float)\r
+0:?     'perSampleColor' (sample out 4-element array of highp 4-component vector of float)\r
+0:?     'badlay' (out 4-element array of highp float)\r
+0:?     'misSized' (out 5-element array of highp float)\r
+0:?     'okaySize' (out 4-element array of highp float)\r
+\r
+\r
+Linked tessellation control stage:\r
+\r
+\r
+Shader version: 310\r
+Requested GL_ARB_separate_shader_objects\r
+Requested GL_OES_shader_io_blocks\r
+Requested GL_OES_tessellation_shader\r
+vertices = 4\r
+ERROR: node is still EOpNull!\r
+0:15  Function Definition: main( (global void)\r
+0:15    Function Parameters: \r
+0:17    Sequence\r
+0:17      Barrier (global void)\r
+0:19      Sequence\r
+0:19        move second child to first child (temp highp int)\r
+0:19          'a' (temp highp int)\r
+0:19          Constant:\r
+0:19            5392 (const int)\r
+0:25      Sequence\r
+0:25        move second child to first child (temp highp 4-component vector of float)\r
+0:25          'p' (temp highp 4-component vector of float)\r
+0:25          gl_Position: direct index for structure (in highp 4-component vector of float)\r
+0:25            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:25              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:25              Constant:\r
+0:25                1 (const int)\r
+0:25            Constant:\r
+0:25              0 (const int)\r
+0:26      Sequence\r
+0:26        move second child to first child (temp highp float)\r
+0:26          'ps' (temp highp float)\r
+0:26          gl_PointSize: direct index for structure (in highp float)\r
+0:26            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:26              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:26              Constant:\r
+0:26                1 (const int)\r
+0:26            Constant:\r
+0:26              1 (const int)\r
+0:27      Sequence\r
+0:27        move second child to first child (temp highp float)\r
+0:27          'cd' (temp highp float)\r
+0:27          Constant:\r
+0:27            0.000000\r
+0:29      Sequence\r
+0:29        move second child to first child (temp highp int)\r
+0:29          'pvi' (temp highp int)\r
+0:29          'gl_PatchVerticesIn' (in highp int PatchVertices)\r
+0:30      Sequence\r
+0:30        move second child to first child (temp highp int)\r
+0:30          'pid' (temp highp int)\r
+0:30          'gl_PrimitiveID' (in highp int PrimitiveID)\r
+0:31      Sequence\r
+0:31        move second child to first child (temp highp int)\r
+0:31          'iid' (temp highp int)\r
+0:31          'gl_InvocationID' (in highp int InvocationID)\r
+0:33      move second child to first child (temp highp 4-component vector of float)\r
+0:33        gl_Position: direct index for structure (out highp 4-component vector of float Position)\r
+0:33          direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:33            'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:33            Constant:\r
+0:33              1 (const int)\r
+0:33          Constant:\r
+0:33            0 (const int)\r
+0:33        'p' (temp highp 4-component vector of float)\r
+0:34      move second child to first child (temp highp float)\r
+0:34        gl_PointSize: direct index for structure (out highp float PointSize)\r
+0:34          direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:34            'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:34            Constant:\r
+0:34              1 (const int)\r
+0:34          Constant:\r
+0:34            1 (const int)\r
+0:34        'ps' (temp highp float)\r
+0:35      move second child to first child (temp highp float)\r
+0:35        Constant:\r
+0:35          0.000000\r
+0:35        'cd' (temp highp float)\r
+0:37      move second child to first child (temp highp float)\r
+0:37        direct index (patch temp highp float TessLevelOuter)\r
+0:37          'gl_TessLevelOuter' (patch out 4-element array of highp float TessLevelOuter)\r
+0:37          Constant:\r
+0:37            3 (const int)\r
+0:37        Constant:\r
+0:37          3.200000\r
+0:38      move second child to first child (temp highp float)\r
+0:38        direct index (patch temp highp float TessLevelInner)\r
+0:38          'gl_TessLevelInner' (patch out 2-element array of highp float TessLevelInner)\r
+0:38          Constant:\r
+0:38            1 (const int)\r
+0:38        Constant:\r
+0:38          1.300000\r
+0:40      Test condition and select (temp void)\r
+0:40        Condition\r
+0:40        Compare Greater Than (temp bool)\r
+0:40          'a' (temp highp int)\r
+0:40          Constant:\r
+0:40            10 (const int)\r
+0:40        true case\r
+0:41        Barrier (global void)\r
+0:40        false case\r
+0:43        Barrier (global void)\r
+0:45      Barrier (global void)\r
+0:49      Loop with condition not tested first\r
+0:49        Loop Condition\r
+0:49        Compare Greater Than (temp bool)\r
+0:49          'a' (temp highp int)\r
+0:49          Constant:\r
+0:49            10 (const int)\r
+0:49        Loop Body\r
+0:48        Sequence\r
+0:48          Barrier (global void)\r
+0:51      switch\r
+0:51      condition\r
+0:51        'a' (temp highp int)\r
+0:51      body\r
+0:51        Sequence\r
+0:52          default: \r
+0:?           Sequence\r
+0:53            Barrier (global void)\r
+0:54            Branch: Break\r
+0:56      Test condition and select (temp highp int)\r
+0:56        Condition\r
+0:56        Compare Less Than (temp bool)\r
+0:56          'a' (temp highp int)\r
+0:56          Constant:\r
+0:56            12 (const int)\r
+0:56        true case\r
+0:56        'a' (temp highp int)\r
+0:56        false case\r
+0:56        Comma (temp highp int)\r
+0:56          Barrier (global void)\r
+0:56          'a' (temp highp int)\r
+0:58      Sequence\r
+0:58        Barrier (global void)\r
+0:61      Branch: Return\r
+0:63      Barrier (global void)\r
+0:69  Function Definition: foo( (global void)\r
+0:69    Function Parameters: \r
+0:71    Sequence\r
+0:71      gl_Position: direct index for structure (out highp 4-component vector of float Position)\r
+0:71        direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:71          'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:71          Constant:\r
+0:71            4 (const int)\r
+0:71        Constant:\r
+0:71          0 (const int)\r
+0:73      Barrier (global void)\r
+0:92  Function Definition: foop( (global void)\r
+0:92    Function Parameters: \r
+0:?     Sequence\r
+0:95      move second child to first child (temp highp float)\r
+0:95        'd' (temp highp float)\r
+0:95        Constant:\r
+0:95          0.000000\r
+0:?   Linker Objects\r
+0:?     'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})\r
+0:?     'outa' (global 4-element array of highp int)\r
+0:?     'patchIn' (patch in highp 4-component vector of float)\r
+0:?     'patchOut' (patch out highp 4-component vector of float)\r
+0:?     'ina' (in highp 2-component vector of float)\r
+0:?     'inb' (in 32-element array of highp 2-component vector of float)\r
+0:?     'inc' (in 32-element array of highp 2-component vector of float)\r
+0:?     'ind' (in 32-element array of highp 2-component vector of float)\r
+0:?     'implA' (patch out 1-element array of highp float)\r
+0:?     'ivla' (layout(location=3 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlb' (layout(location=4 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlc' (layout(location=4 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ovla' (layout(location=3 ) out 4-element array of highp 4-component vector of float)\r
+0:?     'ovlb' (layout(location=4 ) out 4-element array of highp 4-component vector of float)\r
+0:?     'ovlc' (layout(location=4 ) out 4-element array of highp 4-component vector of float)\r
+0:?     'pinbi' (patch out block{out highp int a})\r
+0:?     'myColor2' (centroid out 4-element array of highp 3-component vector of float)\r
+0:?     'centr' (centroid in 32-element array of highp 3-component vector of float)\r
+0:?     'perSampleColor' (sample out 4-element array of highp 4-component vector of float)\r
+0:?     'badlay' (out 4-element array of highp float)\r
+0:?     'misSized' (out 5-element array of highp float)\r
+0:?     'okaySize' (out 4-element array of highp float)\r
+\r
diff --git a/Test/baseResults/310.tese.out b/Test/baseResults/310.tese.out
new file mode 100644 (file)
index 0000000..76e5ea1
--- /dev/null
@@ -0,0 +1,276 @@
+310.tese\r
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.\r
+ERROR: 0:7: 'vertices' : there is no such layout identifier for this stage taking an assigned value \r
+ERROR: 0:9: 'triangles' : cannot change previously set input primitive \r
+ERROR: 0:10: 'isolines' : cannot change previously set input primitive \r
+ERROR: 0:12: 'ccw' : cannot change previously set vertex order \r
+ERROR: 0:16: 'equal_spacing' : cannot change previously set vertex spacing \r
+ERROR: 0:17: 'fractional_even_spacing' : cannot change previously set vertex spacing \r
+ERROR: 0:22: 'patch' : can only use on input in tessellation-evaluation shader \r
+ERROR: 0:26: 'barrier' : no matching overloaded function found \r
+ERROR: 0:38: 'gl_ClipDistance' : no such field in structure \r
+ERROR: 0:38: 'expression' :  left of '[' is not of type array, matrix, or vector  \r
+ERROR: 0:48: 'gl_ClipDistance' : undeclared identifier \r
+ERROR: 0:48: 'gl_ClipDistance' :  left of '[' is not of type array, matrix, or vector  \r
+ERROR: 0:48: 'assign' :  l-value required (can't modify a const)\r
+ERROR: 0:51: 'patch' : cannot use interpolation qualifiers with patch \r
+ERROR: 0:52: 'patch' : cannot use interpolation qualifiers with patch \r
+ERROR: 0:53: 'noperspective' : Reserved word. \r
+ERROR: 0:53: 'noperspective' : not supported with this profile: es\r
+ERROR: 0:53: 'patch' : cannot use interpolation qualifiers with patch \r
+ERROR: 0:54: 'sample' : Reserved word. \r
+ERROR: 0:54: '' : can only have one auxiliary qualifier (centroid, patch, and sample) \r
+ERROR: 0:58: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized \r
+ERROR: 0:63: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use \r
+ERROR: 0:68: 'quads' : cannot apply to 'out' \r
+ERROR: 0:68: 'cw' : can only apply to 'in' \r
+ERROR: 0:69: 'triangles' : cannot apply to 'out' \r
+ERROR: 0:70: 'isolines' : cannot apply to 'out' \r
+ERROR: 0:71: 'cw' : can only apply to 'in' \r
+ERROR: 0:72: 'fractional_odd_spacing' : can only apply to 'in' \r
+ERROR: 0:73: 'equal_spacing' : can only apply to 'in' \r
+ERROR: 0:74: 'fractional_even_spacing' : can only apply to 'in' \r
+ERROR: 0:75: 'point_mode' : can only apply to 'in' \r
+ERROR: 0:77: 'in' : type must be an array: ina\r
+ERROR: 0:79: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized \r
+ERROR: 0:82: 'in' : type must be an array: bla\r
+ERROR: 0:90: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized \r
+ERROR: 0:100: 'location' : overlapping use of location 24\r
+ERROR: 0:103: 'location' : overlapping use of location 24\r
+ERROR: 0:105: 'gl_TessLevelOuter' : identifiers starting with "gl_" are reserved \r
+ERROR: 0:113: 'sample' : Reserved word. \r
+ERROR: 39 compilation errors.  No code generated.\r
+\r
+\r
+Shader version: 310\r
+Requested GL_ARB_separate_shader_objects\r
+Requested GL_EXT_shader_io_blocks\r
+Requested GL_EXT_tessellation_shader\r
+Requested GL_OES_shader_io_blocks\r
+Requested GL_OES_tessellation_shader\r
+input primitive = quads\r
+vertex spacing = fractional_odd_spacing\r
+triangle order = cw\r
+using point mode\r
+ERROR: node is still EOpNull!\r
+0:24  Function Definition: main( (global void)\r
+0:24    Function Parameters: \r
+0:26    Sequence\r
+0:26      Constant:\r
+0:26        0.000000\r
+0:28      Sequence\r
+0:28        move second child to first child (temp highp int)\r
+0:28          'a' (temp highp int)\r
+0:28          Constant:\r
+0:28            1512 (const int)\r
+0:36      Sequence\r
+0:36        move second child to first child (temp highp 4-component vector of float)\r
+0:36          'p' (temp highp 4-component vector of float)\r
+0:36          gl_Position: direct index for structure (in highp 4-component vector of float)\r
+0:36            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:36              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:36              Constant:\r
+0:36                1 (const int)\r
+0:36            Constant:\r
+0:36              0 (const int)\r
+0:37      Sequence\r
+0:37        move second child to first child (temp highp float)\r
+0:37          'ps' (temp highp float)\r
+0:37          gl_PointSize: direct index for structure (in highp float)\r
+0:37            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:37              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:37              Constant:\r
+0:37                1 (const int)\r
+0:37            Constant:\r
+0:37              1 (const int)\r
+0:38      Sequence\r
+0:38        move second child to first child (temp highp float)\r
+0:38          'cd' (temp highp float)\r
+0:38          Constant:\r
+0:38            0.000000\r
+0:40      Sequence\r
+0:40        move second child to first child (temp highp int)\r
+0:40          'pvi' (temp highp int)\r
+0:40          'gl_PatchVerticesIn' (in highp int PatchVertices)\r
+0:41      Sequence\r
+0:41        move second child to first child (temp highp int)\r
+0:41          'pid' (temp highp int)\r
+0:41          'gl_PrimitiveID' (in highp int PrimitiveID)\r
+0:42      Sequence\r
+0:42        move second child to first child (temp highp 3-component vector of float)\r
+0:42          'tc' (temp highp 3-component vector of float)\r
+0:42          'gl_TessCoord' (in highp 3-component vector of float TessCoord)\r
+0:43      Sequence\r
+0:43        move second child to first child (temp highp float)\r
+0:43          'tlo' (temp highp float)\r
+0:43          direct index (patch temp highp float TessLevelOuter)\r
+0:43            'gl_TessLevelOuter' (patch in 4-element array of highp float TessLevelOuter)\r
+0:43            Constant:\r
+0:43              3 (const int)\r
+0:44      Sequence\r
+0:44        move second child to first child (temp highp float)\r
+0:44          'tli' (temp highp float)\r
+0:44          direct index (patch temp highp float TessLevelInner)\r
+0:44            'gl_TessLevelInner' (patch in 2-element array of highp float TessLevelInner)\r
+0:44            Constant:\r
+0:44              1 (const int)\r
+0:46      move second child to first child (temp highp 4-component vector of float)\r
+0:46        gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)\r
+0:46          'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})\r
+0:46          Constant:\r
+0:46            0 (const uint)\r
+0:46        'p' (temp highp 4-component vector of float)\r
+0:47      move second child to first child (temp highp float)\r
+0:47        gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)\r
+0:47          'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})\r
+0:47          Constant:\r
+0:47            1 (const uint)\r
+0:47        'ps' (temp highp float)\r
+0:48      move second child to first child (temp highp float)\r
+0:48        Constant:\r
+0:48          0.000000\r
+0:48        'cd' (temp highp float)\r
+0:?   Linker Objects\r
+0:?     'patchIn' (patch in highp 4-component vector of float)\r
+0:?     'patchOut' (patch out highp 4-component vector of float)\r
+0:?     'badp1' (smooth patch in highp 4-component vector of float)\r
+0:?     'badp2' (flat patch in highp 4-component vector of float)\r
+0:?     'badp3' (noperspective patch in highp 4-component vector of float)\r
+0:?     'badp4' (patch sample in highp 3-component vector of float)\r
+0:?     'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position})\r
+0:?     'ina' (in highp 2-component vector of float)\r
+0:?     'inb' (in 32-element array of highp 2-component vector of float)\r
+0:?     'inc' (in 32-element array of highp 2-component vector of float)\r
+0:?     'ind' (in 32-element array of highp 2-component vector of float)\r
+0:?     'bla' (in block{in highp int f})\r
+0:?     'blb' (in 32-element array of block{in highp int f})\r
+0:?     'blc' (in 32-element array of block{in highp int f})\r
+0:?     'bld' (in 32-element array of block{in highp int f})\r
+0:?     'ivla' (layout(location=23 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlb' (layout(location=24 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlc' (layout(location=24 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ovla' (layout(location=23 ) out 2-element array of highp 4-component vector of float)\r
+0:?     'ovlb' (layout(location=24 ) out 2-element array of highp 4-component vector of float)\r
+0:?     'pinbi' (patch in block{in highp int a})\r
+0:?     'myColor2' (centroid out highp 3-component vector of float)\r
+0:?     'centr' (centroid in 32-element array of highp 3-component vector of float)\r
+0:?     'perSampleColor' (sample out highp 4-component vector of float)\r
+\r
+\r
+Linked tessellation evaluation stage:\r
+\r
+\r
+Shader version: 310\r
+Requested GL_ARB_separate_shader_objects\r
+Requested GL_EXT_shader_io_blocks\r
+Requested GL_EXT_tessellation_shader\r
+Requested GL_OES_shader_io_blocks\r
+Requested GL_OES_tessellation_shader\r
+input primitive = quads\r
+vertex spacing = fractional_odd_spacing\r
+triangle order = cw\r
+using point mode\r
+ERROR: node is still EOpNull!\r
+0:24  Function Definition: main( (global void)\r
+0:24    Function Parameters: \r
+0:26    Sequence\r
+0:26      Constant:\r
+0:26        0.000000\r
+0:28      Sequence\r
+0:28        move second child to first child (temp highp int)\r
+0:28          'a' (temp highp int)\r
+0:28          Constant:\r
+0:28            1512 (const int)\r
+0:36      Sequence\r
+0:36        move second child to first child (temp highp 4-component vector of float)\r
+0:36          'p' (temp highp 4-component vector of float)\r
+0:36          gl_Position: direct index for structure (in highp 4-component vector of float)\r
+0:36            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:36              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:36              Constant:\r
+0:36                1 (const int)\r
+0:36            Constant:\r
+0:36              0 (const int)\r
+0:37      Sequence\r
+0:37        move second child to first child (temp highp float)\r
+0:37          'ps' (temp highp float)\r
+0:37          gl_PointSize: direct index for structure (in highp float)\r
+0:37            direct index (temp block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:37              'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position, in highp float gl_PointSize})\r
+0:37              Constant:\r
+0:37                1 (const int)\r
+0:37            Constant:\r
+0:37              1 (const int)\r
+0:38      Sequence\r
+0:38        move second child to first child (temp highp float)\r
+0:38          'cd' (temp highp float)\r
+0:38          Constant:\r
+0:38            0.000000\r
+0:40      Sequence\r
+0:40        move second child to first child (temp highp int)\r
+0:40          'pvi' (temp highp int)\r
+0:40          'gl_PatchVerticesIn' (in highp int PatchVertices)\r
+0:41      Sequence\r
+0:41        move second child to first child (temp highp int)\r
+0:41          'pid' (temp highp int)\r
+0:41          'gl_PrimitiveID' (in highp int PrimitiveID)\r
+0:42      Sequence\r
+0:42        move second child to first child (temp highp 3-component vector of float)\r
+0:42          'tc' (temp highp 3-component vector of float)\r
+0:42          'gl_TessCoord' (in highp 3-component vector of float TessCoord)\r
+0:43      Sequence\r
+0:43        move second child to first child (temp highp float)\r
+0:43          'tlo' (temp highp float)\r
+0:43          direct index (patch temp highp float TessLevelOuter)\r
+0:43            'gl_TessLevelOuter' (patch in 4-element array of highp float TessLevelOuter)\r
+0:43            Constant:\r
+0:43              3 (const int)\r
+0:44      Sequence\r
+0:44        move second child to first child (temp highp float)\r
+0:44          'tli' (temp highp float)\r
+0:44          direct index (patch temp highp float TessLevelInner)\r
+0:44            'gl_TessLevelInner' (patch in 2-element array of highp float TessLevelInner)\r
+0:44            Constant:\r
+0:44              1 (const int)\r
+0:46      move second child to first child (temp highp 4-component vector of float)\r
+0:46        gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)\r
+0:46          'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})\r
+0:46          Constant:\r
+0:46            0 (const uint)\r
+0:46        'p' (temp highp 4-component vector of float)\r
+0:47      move second child to first child (temp highp float)\r
+0:47        gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)\r
+0:47          'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})\r
+0:47          Constant:\r
+0:47            1 (const uint)\r
+0:47        'ps' (temp highp float)\r
+0:48      move second child to first child (temp highp float)\r
+0:48        Constant:\r
+0:48          0.000000\r
+0:48        'cd' (temp highp float)\r
+0:?   Linker Objects\r
+0:?     'patchIn' (patch in highp 4-component vector of float)\r
+0:?     'patchOut' (patch out highp 4-component vector of float)\r
+0:?     'badp1' (smooth patch in highp 4-component vector of float)\r
+0:?     'badp2' (flat patch in highp 4-component vector of float)\r
+0:?     'badp3' (noperspective patch in highp 4-component vector of float)\r
+0:?     'badp4' (patch sample in highp 3-component vector of float)\r
+0:?     'gl_in' (in 32-element array of block{in highp 4-component vector of float gl_Position})\r
+0:?     'ina' (in highp 2-component vector of float)\r
+0:?     'inb' (in 32-element array of highp 2-component vector of float)\r
+0:?     'inc' (in 32-element array of highp 2-component vector of float)\r
+0:?     'ind' (in 32-element array of highp 2-component vector of float)\r
+0:?     'bla' (in block{in highp int f})\r
+0:?     'blb' (in 32-element array of block{in highp int f})\r
+0:?     'blc' (in 32-element array of block{in highp int f})\r
+0:?     'bld' (in 32-element array of block{in highp int f})\r
+0:?     'ivla' (layout(location=23 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlb' (layout(location=24 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ivlc' (layout(location=24 ) in 32-element array of highp 4-component vector of float)\r
+0:?     'ovla' (layout(location=23 ) out 2-element array of highp 4-component vector of float)\r
+0:?     'ovlb' (layout(location=24 ) out 2-element array of highp 4-component vector of float)\r
+0:?     'pinbi' (patch in block{in highp int a})\r
+0:?     'myColor2' (centroid out highp 3-component vector of float)\r
+0:?     'centr' (centroid in 32-element array of highp 3-component vector of float)\r
+0:?     'perSampleColor' (sample out highp 4-component vector of float)\r
+\r
index 901d332..ff57912 100644 (file)
@@ -17,7 +17,7 @@ ERROR: 0:83: 'vertex-shader struct output containing structure' : not supported
 ERROR: 0:85: 'std430 on a uniform block' : not supported with this profile: es\r
 ERROR: 0:97: 's' : member of block cannot be a sampler type \r
 ERROR: 0:105: 'location' : overlapping use of location 12\r
-ERROR: 0:107: 'in' : cannot declare an input block in a vertex shader \r
+ERROR: 0:107: 'input block' : not supported in this stage: vertex\r
 ERROR: 0:109: 'gl_PerVertex' : block redeclaration has extra members \r
 ERROR: 0:119: 'gl_PointSize' : member of nameless block was not redeclared \r
 ERROR: 0:119: 'assign' :  cannot convert from 'const float' to 'gl_PointSize highp void PointSize'\r
index 384066e..c3bb92c 100644 (file)
@@ -32,7 +32,7 @@ ERROR: 0:125: 'index' : can only be used on an output
 ERROR: 0:126: 'index' : can only be used on an output \r
 ERROR: 0:126: 'location/component/index' : cannot declare a default, use a full declaration \r
 ERROR: 0:127: 'location/component/index' : cannot declare a default, use a full declaration \r
-ERROR: 0:128: 'out' : cannot declare an output block in a fragment shader \r
+ERROR: 0:128: 'output block' : not supported in this stage: fragment\r
 ERROR: 34 compilation errors.  No code generated.\r
 \r
 \r
index a673596..d536a90 100644 (file)
@@ -24,7 +24,7 @@ ERROR: 0:62: 'xxxxx' : illegal vector field selection
 ERROR: 0:63: 'xxy' : vector field selection out of range \r
 ERROR: 0:66: 'binding' : cannot declare a default, include a type or full declaration \r
 ERROR: 0:69: 'location/component/index' : cannot declare a default, use a full declaration \r
-ERROR: 0:70: 'in' : cannot declare an input block in a vertex shader \r
+ERROR: 0:70: 'input block' : not supported in this stage: vertex\r
 ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier \r
 ERROR: 0:71: 'binding' : binding is too large \r
 ERROR: 0:74: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits \r
index e63c105..c3ef534 100644 (file)
@@ -1,7 +1,7 @@
 430.vert\r
 Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.\r
 ERROR: 0:3: 'location' : can only appy to uniform, buffer, in, or out storage qualifiers \r
-ERROR: 0:7: 'in' : cannot declare an input block in a vertex shader \r
+ERROR: 0:7: 'input block' : not supported in this stage: vertex\r
 ERROR: 0:7: 'location qualifier on in/out block' : not supported for this version or the enabled extensions \r
 ERROR: 0:8: 'location qualifier on in/out block' : not supported for this version or the enabled extensions \r
 ERROR: 0:23: 'invariant' : can only apply to an output \r
@@ -18,9 +18,9 @@ ERROR: 0:47: 'gl_ClipDistance array size' : must be less than gl_MaxClipDistance
 ERROR: 0:51: 'start' : undeclared identifier \r
 ERROR: 0:51: '' : constant expression required \r
 ERROR: 0:51: 'layout-id value' : scalar integer expression required \r
-ERROR: 0:53: 'in' : cannot declare an input block in a vertex shader \r
+ERROR: 0:53: 'input block' : not supported in this stage: vertex\r
 ERROR: 0:54: 'location on block member' : not supported for this version or the enabled extensions \r
-ERROR: 0:57: 'in' : cannot declare an input block in a vertex shader \r
+ERROR: 0:57: 'input block' : not supported in this stage: vertex\r
 ERROR: 0:58: 'location on block member' : not supported for this version or the enabled extensions \r
 ERROR: 0:59: 'location on block member' : not supported for this version or the enabled extensions \r
 ERROR: 0:62: 'uniform buffer-member align' : not supported for this version or the enabled extensions \r
@@ -48,8 +48,8 @@ ERROR: 0:92: 'transform feedback qualifier' : not supported for this version or
 ERROR: 0:93: 'transform feedback qualifier' : not supported for this version or the enabled extensions \r
 ERROR: 0:93: 'transform feedback qualifier' : not supported for this version or the enabled extensions \r
 ERROR: 0:93: 'transform feedback qualifier' : not supported for this version or the enabled extensions \r
-ERROR: 0:117: 'in' : cannot declare an input block in a vertex shader \r
-ERROR: 0:123: 'in' : cannot declare an input block in a vertex shader \r
+ERROR: 0:117: 'input block' : not supported in this stage: vertex\r
+ERROR: 0:123: 'input block' : not supported in this stage: vertex\r
 ERROR: 0:146: 'shared' : not supported in this stage: vertex\r
 ERROR: 0:150: 'barrier' : no matching overloaded function found \r
 ERROR: 0:154: 'memoryBarrierShared' : no matching overloaded function found \r
index 40e489b..fdc675f 100644 (file)
@@ -19,13 +19,13 @@ ERROR: 0:35: 'layout' : offset/align can only be used on a uniform or buffer
 ERROR: 0:37: 'offset' : only applies to block members, not blocks \r
 ERROR: 0:38: 'layout' : offset/align can only be used on a uniform or buffer \r
 ERROR: 0:38: 'offset' : only applies to block members, not blocks \r
-ERROR: 0:39: 'out' : cannot declare an output block in a fragment shader \r
+ERROR: 0:39: 'output block' : not supported in this stage: fragment\r
 ERROR: 0:39: 'layout' : offset/align can only be used on a uniform or buffer \r
 ERROR: 0:39: 'offset' : only applies to block members, not blocks \r
 ERROR: 0:42: 'offset/align' : can only be used with std140 or std430 layout packing \r
 ERROR: 0:43: 'offset/align' : can only be used with std140 or std430 layout packing \r
 ERROR: 0:43: 'layout' : offset/align can only be used on a uniform or buffer \r
-ERROR: 0:44: 'out' : cannot declare an output block in a fragment shader \r
+ERROR: 0:44: 'output block' : not supported in this stage: fragment\r
 ERROR: 0:44: 'offset/align' : can only be used with std140 or std430 layout packing \r
 ERROR: 0:44: 'layout' : offset/align can only be used on a uniform or buffer \r
 ERROR: 0:46: 'offset' : cannot specify on a variable declaration \r
index b77fd8c..0e619a3 100644 (file)
@@ -40,6 +40,8 @@ comment.frag
 310.vert
 310.geom
 310.frag
+310.tesc
+310.tese
 310implicitSizeArrayError.vert
 310AofA.vert
 330.frag
index 95485c4..636b442 100644 (file)
@@ -1054,7 +1054,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
     //
     //============================================================================
     bool esBarrier = (profile == EEsProfile && version >= 310);
-    if (profile != EEsProfile && version >= 150)
+    if (profile != EEsProfile && version >= 150 || esBarrier)
         stageBuiltins[EShLangTessControl].append(
             "void barrier();"
             );
@@ -2347,8 +2347,9 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
             s.append(builtInConstant);
         }
 
-        // geometry
         if (version >= 310) {
+            // geometry
+
             snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryInputComponents = %d;", resources.maxGeometryInputComponents);
             s.append(builtInConstant);
             snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputComponents = %d;", resources.maxGeometryOutputComponents);
@@ -2367,6 +2368,46 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
             s.append(builtInConstant);
             snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources.maxGeometryAtomicCounterBuffers);
             s.append(builtInConstant);
+
+            // tessellation
+
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.maxTessControlInputComponents);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.maxTessControlOutputComponents);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTextureImageUnits = %d;", resources.maxTessControlTextureImageUnits);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlUniformComponents = %d;", resources.maxTessControlUniformComponents);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTotalOutputComponents = %d;", resources.maxTessControlTotalOutputComponents);
+            s.append(builtInConstant);
+                
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationInputComponents = %d;", resources.maxTessEvaluationInputComponents);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationOutputComponents = %d;", resources.maxTessEvaluationOutputComponents);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationTextureImageUnits = %d;", resources.maxTessEvaluationTextureImageUnits);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationUniformComponents = %d;", resources.maxTessEvaluationUniformComponents);
+            s.append(builtInConstant);
+                
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessPatchComponents = %d;", resources.maxTessPatchComponents);
+            s.append(builtInConstant);
+
+            snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.maxPatchVertices);
+            s.append(builtInConstant);
+            snprintf(builtInConstant, maxSize, "const int gl_MaxTessGenLevel = %d;", resources.maxTessGenLevel);
+            s.append(builtInConstant);
+
+            // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxPatchVertices
+            if (language == EShLangTessControl || language == EShLangTessEvaluation) {
+                s.append(
+                    "in gl_PerVertex {"
+                        "highp vec4 gl_Position;"
+                        "highp float gl_PointSize;"
+                    "} gl_in[gl_MaxPatchVertices];"
+                    "\n");
+            }
         }
 
     } else {
@@ -2529,6 +2570,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
             snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.maxPatchVertices);
             s.append(builtInConstant);
 
+            // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxPatchVertices
             if (language == EShLangTessControl || language == EShLangTessEvaluation) {
                 s.append(
                     "in gl_PerVertex {"
index 48b82e6..aab573c 100644 (file)
@@ -2440,23 +2440,30 @@ void TParseContext::structArrayCheck(TSourceLoc /*loc*/, const TType& type)
     }
 }
 
-void TParseContext::variableArrayUnsizedCheck(TSourceLoc loc, const TType& type, bool initializer)
+void TParseContext::arrayUnsizedCheck(TSourceLoc loc, const TQualifier& qualifier, int size, bool initializer)
 {
     // desktop always allows unsized variable arrays,
     // ES always allows them if there is an initializer present to get the size from
-    if (profile != EEsProfile || initializer)
+    if (parsingBuiltins || profile != EEsProfile || initializer)
         return;
 
     // for ES, if size isn't coming from an initializer, it has to be explicitly declared now,
     // with very few exceptions
     switch (language) {
     case EShLangGeometry:
-        if (type.getQualifier().storage == EvqVaryingIn)
+        if (qualifier.storage == EvqVaryingIn)
             if (extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader))
                 return;
         break;
     case EShLangTessControl:
-        if (type.getQualifier().storage == EvqVaryingOut)
+        if ( qualifier.storage == EvqVaryingIn ||
+            (qualifier.storage == EvqVaryingOut && ! qualifier.patch))
+            if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
+                return;
+        break;
+    case EShLangTessEvaluation:
+        if ((qualifier.storage == EvqVaryingIn && ! qualifier.patch) ||
+             qualifier.storage == EvqVaryingOut)
             if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
                 return;
         break;
@@ -2464,7 +2471,7 @@ void TParseContext::variableArrayUnsizedCheck(TSourceLoc loc, const TType& type,
         break;
     }
 
-    arraySizeRequiredCheck(loc, type.getArraySize());
+    arraySizeRequiredCheck(loc, size);
 }
 
 void TParseContext::arrayDimError(TSourceLoc loc)
@@ -4068,7 +4075,7 @@ TIntermNode* TParseContext::declareVariable(TSourceLoc loc, TString& identifier,
         if (arraySizes)
             type.setArraySizes(arraySizes);
 
-        variableArrayUnsizedCheck(loc, type, initializer != nullptr);
+        arrayUnsizedCheck(loc, type.getQualifier(), type.getArraySize(), initializer != nullptr);
 
         if (! arrayQualifierError(loc, type.getQualifier()) && ! arrayError(loc, type))
             declareArray(loc, identifier, type, symbol, newDeclaration);
@@ -4525,7 +4532,9 @@ TIntermTyped* TParseContext::constructStruct(TIntermNode* node, const TType& typ
 //
 void TParseContext::declareBlock(TSourceLoc loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes)
 {
-    blockStageIoCheck(loc, currentBlockQualifier.storage, arraySizes);
+    blockStageIoCheck(loc, currentBlockQualifier);
+    if (arraySizes)
+        arrayUnsizedCheck(loc, currentBlockQualifier, arraySizes->getSize(), false);
     arrayDimCheck(loc, arraySizes, 0);
 
     // fix and check for member storage qualifiers and types that don't belong within a block
@@ -4716,85 +4725,35 @@ void TParseContext::declareBlock(TSourceLoc loc, TTypeList& typeList, const TStr
 }
 
 // Do all block-declaration checking regarding the combination of in/out/uniform/buffer
-// with a particular stage and with a given arrayness.
-void TParseContext::blockStageIoCheck(TSourceLoc loc, TStorageQualifier storageQualifier, TArraySizes* arraySizes)
+// with a particular stage.
+void TParseContext::blockStageIoCheck(TSourceLoc loc, const TQualifier& qualifier)
 {
-    switch (storageQualifier) {
+    switch (qualifier.storage) {
     case EvqUniform:
         profileRequires(loc, EEsProfile, 300, nullptr, "uniform block");
         profileRequires(loc, ENoProfile, 140, nullptr, "uniform block");
         if (currentBlockQualifier.layoutPacking == ElpStd430)
             requireProfile(loc, ~EEsProfile, "std430 on a uniform block");
-        if (profile == EEsProfile && arraySizes)
-            arraySizeRequiredCheck(loc, arraySizes->getSize());
         break;
     case EvqBuffer:
         requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "buffer block");
         profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, "buffer block");
         profileRequires(loc, EEsProfile, 310, nullptr, "buffer block");
-        if (profile == EEsProfile && arraySizes)
-            arraySizeRequiredCheck(loc, arraySizes->getSize());
         break;
     case EvqVaryingIn:
         profileRequires(loc, ~EEsProfile, 150, GL_ARB_separate_shader_objects, "input block");
-        switch (language) {
-        case EShLangVertex:
-            // It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader
-            error(loc, "cannot declare an input block in a vertex shader", "in", "");
-            break;
-        case EShLangTessEvaluation:
-        case EShLangTessControl:
-            if (profile == EEsProfile && arraySizes)
-                arraySizeRequiredCheck(loc, arraySizes->getSize());
-            break;
-        case EShLangGeometry:
-            break;
-        case EShLangFragment:
+        // It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader
+        // "Compute shaders do not permit user-defined input variables..."
+        requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|EShLangFragmentMask), "input block");
+        if (language == EShLangFragment)
             profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
-            if (profile == EEsProfile && arraySizes)
-                arraySizeRequiredCheck(loc, arraySizes->getSize());
-            break;
-        case EShLangCompute:
-            // "Compute shaders do not permit user-defined input variables..."
-            requireStage(loc, (EShLanguageMask)~EShLangComputeMask, "input block");
-            break;
-        default:
-            error(loc, "unexpected stage", "", "");
-            break;
-        }
         break;
     case EvqVaryingOut:
         profileRequires(loc, ~EEsProfile, 150, GL_ARB_separate_shader_objects, "output block");
-        switch (language) {
-        case EShLangVertex:
-            // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins
-            if (! parsingBuiltins)
-                profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
-            if (profile == EEsProfile && arraySizes)
-                arraySizeRequiredCheck(loc, arraySizes->getSize());
-            break;
-        case EShLangTessEvaluation:
-            if (profile == EEsProfile && arraySizes)
-                arraySizeRequiredCheck(loc, arraySizes->getSize());
-            break;
-        case EShLangTessControl:
-            break;
-        case EShLangGeometry:
-            if (profile == EEsProfile && arraySizes)
-                arraySizeRequiredCheck(loc, arraySizes->getSize());
-            break;
-        case EShLangFragment:
-            // It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader
-            error(loc, "cannot declare an output block in a fragment shader", "out", "");
-            break;
-        case EShLangCompute:
-            // "Compute shaders ... do not support user-defined output variables..."
-            requireStage(loc, (EShLanguageMask)~EShLangComputeMask, "output block");
-            break;
-        default:
-            error(loc, "unexpected stage", "", "");
-            break;
-        }
+        requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask), "output block");
+        // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins
+        if (language == EShLangVertex && ! parsingBuiltins)
+            profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
         break;
     default:
         error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), "");
index ee9d892..f27d5a5 100644 (file)
@@ -127,7 +127,7 @@ public:
     bool arrayError(TSourceLoc, const TType&);
     void arraySizeRequiredCheck(TSourceLoc, int size);
     void structArrayCheck(TSourceLoc, const TType& structure);
-    void variableArrayUnsizedCheck(TSourceLoc, const TType&, bool initializer);
+    void arrayUnsizedCheck(TSourceLoc, const TQualifier&, int size, bool initializer);
     void arrayDimError(TSourceLoc);
     void arrayDimCheck(TSourceLoc, TArraySizes* sizes1, TArraySizes* sizes2);
     void arrayDimCheck(TSourceLoc, const TType*, TArraySizes*);
@@ -181,7 +181,7 @@ public:
     TIntermTyped* constructStruct(TIntermNode*, const TType&, int, TSourceLoc);
     TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, TSourceLoc, bool subset);
     void declareBlock(TSourceLoc, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
-    void blockStageIoCheck(TSourceLoc, TStorageQualifier, TArraySizes*);
+    void blockStageIoCheck(TSourceLoc, const TQualifier&);
     void fixBlockLocations(TSourceLoc, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
     void fixBlockXfbOffsets(TQualifier&, TTypeList&);
     void fixBlockUniformOffsets(TQualifier&, TTypeList&);
index 83f16ce..3c4975a 100644 (file)
@@ -723,10 +723,12 @@ int TScanContext::tokenizeIdentifier()
         return keyword;
 
     case PATCH:
-        if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionsTurnedOn(1, &GL_ARB_tessellation_shader))
-            return es30ReservedFromGLSL(150);
-        else
-            return es30ReservedFromGLSL(400);
+        if (parseContext.symbolTable.atBuiltInLevel() ||
+            (parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) ||
+            (parseContext.profile != EEsProfile && parseContext.extensionsTurnedOn(1, &GL_ARB_tessellation_shader)))
+            return keyword;
+
+        return es30ReservedFromGLSL(400);
 
     case SAMPLE:
     case SUBROUTINE:
index 7f9d5c9..21777ae 100644 (file)
@@ -186,7 +186,7 @@ void TParseContext::initializeExtensionBehavior()
     extensionBehavior[GL_EXT_gpu_shader5]                          = EBhDisablePartial;
     extensionBehavior[GL_EXT_primitive_bounding_box]               = EBhDisablePartial;
     extensionBehavior[GL_EXT_shader_io_blocks]                     = EBhDisable;
-    extensionBehavior[GL_EXT_tessellation_shader]                  = EBhDisablePartial;
+    extensionBehavior[GL_EXT_tessellation_shader]                  = EBhDisable;
     extensionBehavior[GL_EXT_tessellation_point_size]              = EBhDisablePartial;
     extensionBehavior[GL_EXT_texture_buffer]                       = EBhDisablePartial;
     extensionBehavior[GL_EXT_texture_cube_map_array]               = EBhDisablePartial;
@@ -196,7 +196,7 @@ void TParseContext::initializeExtensionBehavior()
     extensionBehavior[GL_OES_gpu_shader5]              = EBhDisablePartial;
     extensionBehavior[GL_OES_primitive_bounding_box]   = EBhDisablePartial;
     extensionBehavior[GL_OES_shader_io_blocks]         = EBhDisable;
-    extensionBehavior[GL_OES_tessellation_shader]      = EBhDisablePartial;
+    extensionBehavior[GL_OES_tessellation_shader]      = EBhDisable;
     extensionBehavior[GL_OES_texture_buffer]           = EBhDisablePartial;
     extensionBehavior[GL_OES_texture_cube_map_array]   = EBhDisablePartial;
 }