Allow tessellation shaders to work on versions back to 150. Also combined all the tessellation tests into a single run.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24569 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-18 18:47:12 +00:00
parent 7c908d2543
commit e8fe7b81d7
20 changed files with 1487 additions and 582 deletions

View File

@ -18,3 +18,5 @@ void main()
#endif
in struct S { float f; } s; // ERROR
float patch = 3.1;

View File

@ -14,3 +14,5 @@ void main()
layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, declared after use
in struct S { float f; } s;
float patch = 3.1;

34
Test/150.tesc Normal file
View File

@ -0,0 +1,34 @@
#version 150
#extension GL_ARB_tessellation_shader : enable
layout(vertices = 4) out;
int outa[gl_out.length()];
patch out vec4 patchOut;
void main()
{
barrier();
int a = gl_MaxTessControlInputComponents +
gl_MaxTessControlOutputComponents +
gl_MaxTessControlTextureImageUnits +
gl_MaxTessControlUniformComponents +
gl_MaxTessControlTotalOutputComponents;
vec4 p = gl_in[1].gl_Position;
float ps = gl_in[1].gl_PointSize;
float cd = gl_in[1].gl_ClipDistance[2];
int pvi = gl_PatchVerticesIn;
int pid = gl_PrimitiveID;
int iid = gl_InvocationID;
gl_out[1].gl_Position = p;
gl_out[1].gl_PointSize = ps;
gl_out[1].gl_ClipDistance[1] = cd;
gl_TessLevelOuter[3] = 3.2;
gl_TessLevelInner[1] = 1.3;
}

35
Test/150.tese Normal file
View File

@ -0,0 +1,35 @@
#version 150
#extension GL_ARB_tessellation_shader : enable
layout(quads, cw) in;
layout(fractional_odd_spacing) in;
layout(point_mode) in;
patch in vec4 patchIn;
void main()
{
barrier(); // ERROR
int a = gl_MaxTessEvaluationInputComponents +
gl_MaxTessEvaluationOutputComponents +
gl_MaxTessEvaluationTextureImageUnits +
gl_MaxTessEvaluationUniformComponents +
gl_MaxTessPatchComponents +
gl_MaxPatchVertices +
gl_MaxTessGenLevel;
vec4 p = gl_in[1].gl_Position;
float ps = gl_in[1].gl_PointSize;
float cd = gl_in[1].gl_ClipDistance[2];
int pvi = gl_PatchVerticesIn;
int pid = gl_PrimitiveID;
vec3 tc = gl_TessCoord;
float tlo = gl_TessLevelOuter[3];
float tli = gl_TessLevelInner[1];
gl_Position = p;
gl_PointSize = ps;
gl_ClipDistance[2] = cd;
}

View File

@ -17,6 +17,11 @@ ERROR: node is still EOpNull!
0:12 'gl_ClipDistance' (smooth in 5-element array of float)
0:12 Constant:
0:12 2 (const int)
0:22 Sequence
0:22 move second child to first child (float)
0:22 'patch' (float)
0:22 Constant:
0:22 3.100000
0:? Linker Objects
0:? 'v' (smooth in 4-component vector of float)
0:? 'i' (smooth in 4-component vector of float)
@ -24,6 +29,7 @@ ERROR: node is still EOpNull!
0:? 'gl_ClipDistance' (smooth in 5-element array of float)
0:? 'gl_ClipDistance' (smooth in 5-element array of float)
0:? 's' (smooth in structure{f})
0:? 'patch' (float)
Linked fragment stage:

View File

@ -17,11 +17,17 @@ ERROR: node is still EOpNull!
0:11 move second child to first child (4-component vector of float)
0:11 'c' (4-component vector of float)
0:11 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:18 Sequence
0:18 move second child to first child (float)
0:18 'patch' (float)
0:18 Constant:
0:18 3.100000
0:? Linker Objects
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float)
0:? 'foo' (smooth in 4-component vector of float)
0:? 's' (smooth in structure{f})
0:? 'patch' (float)
Linked fragment stage:

File diff suppressed because it is too large Load Diff

View File

@ -1,134 +0,0 @@
400.tesc
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignemnt (e.g., binding = 4)
ERROR: 0:10: 'patch' : can only use on output in tessellation-control shader
ERROR: 0:39: 'vertices' : can only apply to 'out'
ERROR: 0:40: 'vertices' : cannot change previously set layout value
ERROR: 0:44: '[' : array index out of range '4'
ERROR: 7 compilation errors. No code generated.
vertices = 4
ERROR: node is still EOpNull!
0:13 Function Definition: main( (void)
0:13 Function Parameters:
0:15 Sequence
0:15 Barrier (void)
0:17 Sequence
0:17 move second child to first child (int)
0:17 'a' (int)
0:17 Constant:
0:17 5392 (const int)
0:23 Sequence
0:23 move second child to first child (4-component vector of float)
0:23 'p' (4-component vector of float)
0:23 gl_Position: direct index for structure (4-component vector of float)
0:23 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:23 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:23 Constant:
0:23 1 (const int)
0:23 Constant:
0:23 0 (const int)
0:24 Sequence
0:24 move second child to first child (float)
0:24 'ps' (float)
0:24 gl_PointSize: direct index for structure (float)
0:24 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:24 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:24 Constant:
0:24 1 (const int)
0:24 Constant:
0:24 1 (const int)
0:25 Sequence
0:25 move second child to first child (float)
0:25 'cd' (float)
0:25 direct index (float)
0:25 gl_ClipDistance: direct index for structure (unsized array of float)
0:25 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:25 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
0:25 2 (const int)
0:25 Constant:
0:25 2 (const int)
0:27 Sequence
0:27 move second child to first child (int)
0:27 'pvi' (int)
0:27 'gl_PatchVerticesIn' (in int)
0:28 Sequence
0:28 move second child to first child (int)
0:28 'pid' (int)
0:28 'gl_PrimitiveID' (in int)
0:29 Sequence
0:29 move second child to first child (int)
0:29 'iid' (int)
0:29 'gl_InvocationID' (in int)
0:31 move second child to first child (4-component vector of float)
0:31 gl_Position: direct index for structure (4-component vector of float)
0:31 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 0 (const int)
0:31 'p' (4-component vector of float)
0:32 move second child to first child (float)
0:32 gl_PointSize: direct index for structure (float)
0:32 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 Constant:
0:32 1 (const int)
0:32 Constant:
0:32 1 (const int)
0:32 'ps' (float)
0:33 move second child to first child (float)
0:33 direct index (float)
0:33 gl_ClipDistance: direct index for structure (unsized array of float)
0:33 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 Constant:
0:33 1 (const int)
0:33 Constant:
0:33 2 (const int)
0:33 Constant:
0:33 1 (const int)
0:33 'cd' (float)
0:35 move second child to first child (float)
0:35 direct index (patch float)
0:35 'gl_TessLevelOuter' (patch out 4-element array of float)
0:35 Constant:
0:35 3 (const int)
0:35 Constant:
0:35 3.200000
0:36 move second child to first child (float)
0:36 direct index (patch float)
0:36 'gl_TessLevelInner' (patch out 2-element array of float)
0:36 Constant:
0:36 1 (const int)
0:36 Constant:
0:36 1.300000
0:42 Function Definition: foo( (void)
0:42 Function Parameters:
0:44 Sequence
0:44 gl_PointSize: direct index for structure (float)
0:44 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:44 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:44 Constant:
0:44 4 (const int)
0:44 Constant:
0:44 1 (const int)
0:? Linker Objects
0:? 'outa' (4-element array of int)
0:? 'patchIn' (patch in 4-component vector of float)
0:? 'patchOut' (patch out 4-component vector of float)
0:? 'gl_out' (out 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
Linked tessellation control stage:
vertices = 4

View File

@ -1,141 +0,0 @@
400.tese
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:3: 'vertices' : there is no such layout identifier for this stage taking an assigned value
ERROR: 0:5: 'triangles' : cannot change previously set input primitive
ERROR: 0:6: 'isolines' : cannot change previously set input primitive
ERROR: 0:8: 'ccw' : cannot change previously set vertex order
ERROR: 0:12: 'equal_spacing' : cannot change previously set vertex spacing
ERROR: 0:13: 'fractional_even_spacing' : cannot change previously set vertex spacing
ERROR: 0:18: 'patch' : can only use on input in tessellation-evaluation shader
ERROR: 0:22: 'barrier' : no matching overloaded function found
ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as unsized
ERROR: 0:59: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
ERROR: 0:64: 'quads' : cannot apply to 'out'
ERROR: 0:64: 'cw' : can only apply to 'in'
ERROR: 0:65: 'triangles' : cannot apply to 'out'
ERROR: 0:66: 'isolines' : cannot apply to 'out'
ERROR: 0:67: 'cw' : can only apply to 'in'
ERROR: 0:68: 'fractional_odd_spacing' : can only apply to 'in'
ERROR: 0:69: 'equal_spacing' : can only apply to 'in'
ERROR: 0:70: 'fractional_even_spacing' : can only apply to 'in'
ERROR: 0:71: 'point_mode' : can only apply to 'in'
ERROR: 23 compilation errors. No code generated.
input primitive = quads
vertex spacing = fractional_odd_spacing
triangle order = cw
using point mode
ERROR: node is still EOpNull!
0:20 Function Definition: main( (void)
0:20 Function Parameters:
0:22 Sequence
0:22 Constant:
0:22 0.000000
0:24 Sequence
0:24 move second child to first child (int)
0:24 'a' (int)
0:24 Constant:
0:24 1512 (const int)
0:32 Sequence
0:32 move second child to first child (4-component vector of float)
0:32 'p' (4-component vector of float)
0:32 gl_Position: direct index for structure (4-component vector of float)
0:32 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:32 Constant:
0:32 1 (const int)
0:32 Constant:
0:32 0 (const int)
0:33 Sequence
0:33 move second child to first child (float)
0:33 'ps' (float)
0:33 gl_PointSize: direct index for structure (float)
0:33 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 Constant:
0:33 1 (const int)
0:33 Constant:
0:33 1 (const int)
0:34 Sequence
0:34 move second child to first child (float)
0:34 'cd' (float)
0:34 direct index (float)
0:34 gl_ClipDistance: direct index for structure (unsized array of float)
0:34 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:34 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:34 Constant:
0:34 1 (const int)
0:34 Constant:
0:34 2 (const int)
0:34 Constant:
0:34 2 (const int)
0:36 Sequence
0:36 move second child to first child (int)
0:36 'pvi' (int)
0:36 'gl_PatchVerticesIn' (in int)
0:37 Sequence
0:37 move second child to first child (int)
0:37 'pid' (int)
0:37 'gl_PrimitiveID' (in int)
0:38 Sequence
0:38 move second child to first child (3-component vector of float)
0:38 'tc' (3-component vector of float)
0:38 'gl_TessCoord' (in 3-component vector of float)
0:39 Sequence
0:39 move second child to first child (float)
0:39 'tlo' (float)
0:39 direct index (patch float)
0:39 'gl_TessLevelOuter' (patch in 4-element array of float)
0:39 Constant:
0:39 3 (const int)
0:40 Sequence
0:40 move second child to first child (float)
0:40 'tli' (float)
0:40 direct index (patch float)
0:40 'gl_TessLevelInner' (patch in 2-element array of float)
0:40 Constant:
0:40 1 (const int)
0:42 move second child to first child (4-component vector of float)
0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float)
0:42 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:42 Constant:
0:42 0 (const uint)
0:42 'p' (4-component vector of float)
0:43 move second child to first child (float)
0:43 gl_PointSize: direct index for structure (gl_PointSize float)
0:43 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:43 Constant:
0:43 1 (const uint)
0:43 'ps' (float)
0:44 move second child to first child (float)
0:44 direct index (float)
0:44 gl_ClipDistance: direct index for structure (unsized array of float)
0:44 '__anon__1' (out block{gl_Position,gl_PointSize,gl_ClipDistance})
0:44 Constant:
0:44 2 (const uint)
0:44 Constant:
0:44 2 (const int)
0:44 'cd' (float)
0:? Linker Objects
0:? 'patchIn' (patch in 4-component vector of float)
0:? 'patchOut' (patch out 4-component vector of float)
0:? 'badp1' (smooth patch in 4-component vector of float)
0:? 'badp2' (flat patch in 4-component vector of float)
0:? 'badp3' (noperspective patch in 4-component vector of float)
0:? 'badp4' (patch sample in 3-component vector of float)
0:? 'gl_in' (in 32-element array of block{gl_ClipDistance})
Linked tessellation evaluation stage:
input primitive = quads
vertex spacing = fractional_odd_spacing
triangle order = cw
using point mode

View File

@ -1,21 +0,0 @@
410.tesc
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:4: 'length' : array must first be sized by a redeclaration or layout qualifier
ERROR: 1 compilation errors. No code generated.
vertices = 0
ERROR: node is still EOpNull!
0:8 Function Definition: main( (void)
0:8 Function Parameters:
0:? Linker Objects
0:? 'outa' (1-element array of int)
0:? 'patchOut' (patch out 4-component vector of float)
Linked tessellation control stage:
ERROR: Linking tessellation control stage: At least one shader must specify an output layout(vertices=...)
vertices = 0

View File

@ -1,87 +0,0 @@
420.tesc
Warning, version 400 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out
ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a
ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb
ERROR: 0:26: 'gl_PointSize' : no such field in structure
ERROR: 0:26: 'assign' : cannot convert from 'float' to 'block{gl_Position}'
ERROR: 0:29: 'out' : type must be an array: outf
ERROR: 6 compilation errors. No code generated.
vertices = 4
ERROR: node is still EOpNull!
0:15 Function Definition: main( (void)
0:15 Function Parameters:
0:17 Sequence
0:17 Sequence
0:17 move second child to first child (4-component vector of float)
0:17 'p' (4-component vector of float)
0:17 gl_Position: direct index for structure (4-component vector of float)
0:17 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:17 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:17 Constant:
0:17 1 (const int)
0:17 Constant:
0:17 0 (const int)
0:18 Sequence
0:18 move second child to first child (float)
0:18 'ps' (float)
0:18 gl_PointSize: direct index for structure (float)
0:18 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:18 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:18 Constant:
0:18 1 (const int)
0:18 Constant:
0:18 1 (const int)
0:19 Sequence
0:19 move second child to first child (float)
0:19 'cd' (float)
0:19 direct index (float)
0:19 gl_ClipDistance: direct index for structure (unsized array of float)
0:19 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:19 'gl_in' (in 32-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:19 Constant:
0:19 1 (const int)
0:19 Constant:
0:19 2 (const int)
0:19 Constant:
0:19 2 (const int)
0:21 Sequence
0:21 move second child to first child (int)
0:21 'pvi' (int)
0:21 'gl_PatchVerticesIn' (in int)
0:22 Sequence
0:22 move second child to first child (int)
0:22 'pid' (int)
0:22 'gl_PrimitiveID' (in int)
0:23 Sequence
0:23 move second child to first child (int)
0:23 'iid' (int)
0:23 'gl_InvocationID' (in int)
0:25 move second child to first child (4-component vector of float)
0:25 gl_Position: direct index for structure (4-component vector of float)
0:25 direct index (block{gl_Position})
0:25 'gl_out' (out 3-element array of block{gl_Position})
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
0:25 0 (const int)
0:25 'p' (4-component vector of float)
0:26 direct index (block{gl_Position})
0:26 'gl_out' (out 3-element array of block{gl_Position})
0:26 Constant:
0:26 1 (const int)
0:? Linker Objects
0:? 'gl_out' (out 3-element array of block{gl_Position})
0:? 'a' (out 3-element array of int)
0:? 'outb' (out 5-element array of int)
0:? 'outc' (out 4-element array of int)
0:? 'outf' (out float)
Linked tessellation control stage:
vertices = 4

View File

@ -1,171 +0,0 @@
420.tese
Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:7: '=' : cannot convert from '3-element array of float' to '2-element array of float'
ERROR: 0:8: 'initializer list' : wrong vector size (or rows in a matrix column): 2-component vector of float
ERROR: 0:9: 'initializer list' : wrong number of matrix columns: 3X3 matrix of float
ERROR: 0:10: 'initializer list' : wrong number of matrix columns: 2X2 matrix of float
ERROR: 0:25: 'initializer list' : wrong number of structure members
ERROR: 0:27: '=' : cannot convert from 'const bool' to 'int'
ERROR: 0:28: 'constructor' : cannot convert parameter 2 from 'const float' to '4-component vector of float'
ERROR: 0:29: 'constructor' : cannot convert parameter 2 from 'const 2X2 matrix of float' to 'const 4-component vector of float'
ERROR: 0:29: 'const 2-element array of 4-component vector of float' : cannot construct with these arguments
ERROR: 0:29: '=' : cannot convert from 'const float' to '2-element array of 4-component vector of float'
ERROR: 0:30: 'initializer list' : wrong number of matrix columns: 4X2 matrix of float
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from 'float' to 'structure{s,t}'
ERROR: 0:58: 'initializer list' : wrong number of structure members
ERROR: 13 compilation errors. No code generated.
input primitive = none
vertex spacing = none
triangle order = none
ERROR: node is still EOpNull!
0:4 Sequence
0:4 move second child to first child (2X2 matrix of float)
0:4 'b' (2X2 matrix of float)
0:4 Constant:
0:4 1.000000
0:4 0.000000
0:4 0.000000
0:4 1.000000
0:15 Sequence
0:15 move second child to first child (structure{a,b})
0:15 'e' (structure{a,b})
0:15 Constant:
0:15 1.200000
0:15 2 (const int)
0:20 Sequence
0:20 move second child to first child (structure{a,b})
0:20 'e2' (structure{a,b})
0:20 Constant:
0:20 1.000000
0:20 3 (const int)
0:42 Sequence
0:42 move second child to first child (5-element array of float)
0:42 'b5' (5-element array of float)
0:42 Constant:
0:42 3.400000
0:42 4.200000
0:42 5.000000
0:42 5.200000
0:42 1.100000
0:67 Sequence
0:67 move second child to first child (3-component vector of float)
0:67 'av3' (3-component vector of float)
0:67 Construct vec3 (3-component vector of float)
0:67 'vc1' (float)
0:67 'vc2' (float)
0:67 'vc3' (float)
0:68 Sequence
0:68 move second child to first child (3-component vector of float)
0:68 'bv3' (3-component vector of float)
0:68 Construct vec3 (3-component vector of float)
0:68 'vc1' (float)
0:68 'vc2' (float)
0:68 'vc3' (float)
0:70 Function Definition: main( (void)
0:70 Function Parameters:
0:72 Sequence
0:72 MemoryBarrier (void)
0:74 Test condition and select (void)
0:74 Condition
0:74 Compare Equal (bool)
0:74 Constant:
0:74 1 (const uint)
0:74 2 (const uint)
0:74 3.000000
0:74 4.000000
0:74 0.000000
0:74 0.000000
0:74 0.000000
0:74 4.000000
0:74 0.000000
0:74 5.000000
0:74 6.000000
0:74 0.000000
0:74 0.000000
0:74 0.000000
0:74 6.000000
0:74 0.000000
0:74 'curlybad1' (structure{uv2,s})
0:74 true case is null
0:76 Test condition and select (void)
0:76 Condition
0:76 Constant:
0:76 true (const bool)
0:76 true case is null
0:? Linker Objects
0:? 'a' (const 2X2 matrix of float)
0:? 1.000000
0:? 0.000000
0:? 0.000000
0:? 1.000000
0:? 'b' (2X2 matrix of float)
0:? 'c' (const 2X2 matrix of float)
0:? 1.000000
0:? 0.000000
0:? 0.000000
0:? 1.000000
0:? 'a2' (2-element array of float)
0:? 'b2' (2-component vector of float)
0:? 'c2' (3X3 matrix of float)
0:? 'd' (2X2 matrix of float)
0:? 'e' (structure{a,b})
0:? 'e2' (structure{a,b})
0:? 'e3' (structure{a,b})
0:? 'a3' (int)
0:? 'b3' (2-element array of 4-component vector of float)
0:? 'b4' (2-element array of 4-component vector of float)
0:? 'c3' (4X2 matrix of float)
0:? 'd2' (unsized array of structure{s,t})
0:? 'b5' (5-element array of float)
0:? 'constructed' (const structure{uv2,s})
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3.000000
0:? 4.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 4.000000
0:? 0.000000
0:? 5.000000
0:? 6.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 6.000000
0:? 0.000000
0:? 'curlybad1' (structure{uv2,s})
0:? 'curlyInit' (const structure{uv2,s})
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3.000000
0:? 4.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 4.000000
0:? 0.000000
0:? 5.000000
0:? 6.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 6.000000
0:? 0.000000
0:? 'vc1' (float)
0:? 'vc2' (float)
0:? 'vc3' (float)
0:? 'av3' (3-component vector of float)
0:? 'bv3' (3-component vector of float)
Linked tessellation evaluation stage:
ERROR: Linking tessellation evaluation stage: At least one shader must specify an input layout primitive
input primitive = none
vertex spacing = equal_spacing
triangle order = ccw

View File

@ -26,22 +26,23 @@ while read t; do
done < testlist
#
# grouped shaders for link tests
# grouped shaders for bulk (faster) tests
#
function runLinkTest {
function runBulkTest {
echo Running $*...
$EXE -i -l $* > $TARGETDIR/$1.out
$EXE -i -l -t $* > $TARGETDIR/$1.out
diff -b $BASEDIR/$1.out $TARGETDIR/$1.out
}
runLinkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
runLinkTest noMain.vert mains.frag
runLinkTest link1.frag link2.frag link3.frag
runLinkTest recurse1.vert recurse1.frag recurse2.frag
runLinkTest 300link.frag
runLinkTest 300link2.frag
runLinkTest 300link3.frag
runLinkTest empty.frag empty2.frag empty3.frag
runBulkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
runBulkTest noMain.vert mains.frag
runBulkTest link1.frag link2.frag link3.frag
runBulkTest recurse1.vert recurse1.frag recurse2.frag
runBulkTest 300link.frag
runBulkTest 300link2.frag
runBulkTest 300link3.frag
runBulkTest empty.frag empty2.frag empty3.frag
runBulkTest 150.tesc 150.tese 400.tesc 400.tese 410.tesc 420.tesc 420.tese
#
# reflection tests

View File

@ -49,7 +49,6 @@ tokenLength.vert
300scope.vert
400.frag
420.vert
420.tesc
420.geom
420_size_gl_in.geom
430scope.vert
@ -57,11 +56,7 @@ lineContinuation100.vert
lineContinuation.vert
numeral.frag
400.geom
400.tesc
400.tese
410.geom
410.tesc
420.tese
430.vert
430.comp
dce.frag

View File

@ -9,5 +9,5 @@
// source have to figure out how to create revision.h just to get a build
// going. However, if it is not updated, it can be a version behind.
#define GLSLANG_REVISION "24530"
#define GLSLANG_DATE "2013/12/16 16:58:15"
#define GLSLANG_REVISION "24551"
#define GLSLANG_DATE "2013/12/17 20:06:24"

View File

@ -811,7 +811,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
//
//============================================================================
if (version >= 400)
if (version >= 150)
stageBuiltins[EShLangTessControl].append(
"void barrier();"
);
@ -1255,7 +1255,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
//
//============================================================================
if (version >= 400) {
if (version >= 150) {
// Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
// as it depends on the resource sizing of gl_MaxPatchVertices.
@ -1293,7 +1293,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
//
//============================================================================
if (version >= 400) {
if (version >= 150) {
// Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
// as it depends on the resource sizing of gl_MaxPatchVertices.
@ -2001,7 +2001,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
}
// tessellation
if (version >= 400) {
if (version >= 150) {
snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.maxTessControlInputComponents);
s.append(builtInConstant);
snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.maxTessControlOutputComponents);

View File

@ -654,6 +654,11 @@ 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);
case SAMPLE:
case SUBROUTINE:
return es30ReservedFromGLSL(400);

View File

@ -191,7 +191,7 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
// do the per-stage tables
InitializeStageSymbolTable(builtIns, version, profile, EShLangVertex, infoSink, commonTable, symbolTables);
InitializeStageSymbolTable(builtIns, version, profile, EShLangFragment, infoSink, commonTable, symbolTables);
if (profile != EEsProfile && version >= 400) {
if (profile != EEsProfile && version >= 150) {
InitializeStageSymbolTable(builtIns, version, profile, EShLangTessControl, infoSink, commonTable, symbolTables);
InitializeStageSymbolTable(builtIns, version, profile, EShLangTessEvaluation, infoSink, commonTable, symbolTables);
}
@ -353,10 +353,10 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
break;
case EShLangTessControl:
case EShLangTessEvaluation:
if (version < 400 || (profile != ECoreProfile && profile != ECompatibilityProfile)) {
if (version < 150 || (profile != ECoreProfile && profile != ECompatibilityProfile)) {
correct = false;
infoSink.info.message(EPrefixError, "#version: tessellation shaders require non-es profile and version 400 or above");
version = 400;
infoSink.info.message(EPrefixError, "#version: tessellation shaders require non-es profile and version 150 or above");
version = 150;
profile = ECoreProfile;
}
break;

View File

@ -85,7 +85,7 @@ const char* const GL_ARB_shading_language_420pack = "GL_ARB_shading_language_420
const char* const GL_ARB_texture_gather = "GL_ARB_texture_gather";
const char* const GL_ARB_gpu_shader5 = "GL_ARB_gpu_shader5";
const char* const GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects";
const char* const GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader"; // TODO: tessellation: make this extension work on version 150 and above shaders
const char* const GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader";
} // end namespace glslang

View File

@ -1227,7 +1227,6 @@ storage_qualifier
| PATCH {
parseContext.globalCheck($1.loc, "patch");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
parseContext.profileRequires($1.loc, ~EEsProfile, 400, 1, &GL_ARB_tessellation_shader, "patch");
$$.init($1.loc);
$$.qualifier.patch = true;
}