Additional semantic checking for tessellation shaders and related clean up:
[platform/upstream/glslang.git] / Test / 400.tese
1 #version 400 core\r
2 \r
3 layout(vertices = 4) out; // ERROR\r
4 layout(quads, cw) in;\r
5 layout(triangles) in;     // ERROR\r
6 layout(isolines) in;      // ERROR\r
7 \r
8 layout(ccw) in;           // ERROR\r
9 layout(cw) in;\r
10 \r
11 layout(fractional_odd_spacing) in;    \r
12 layout(equal_spacing) in;              // ERROR\r
13 layout(fractional_even_spacing) in;    // ERROR\r
14 \r
15 layout(point_mode) in;\r
16 \r
17 patch in vec4 patchIn;\r
18 patch out vec4 patchOut;  // ERROR\r
19 \r
20 void main()\r
21 {\r
22     barrier(); // ERROR\r
23 \r
24     int a = gl_MaxTessEvaluationInputComponents +\r
25             gl_MaxTessEvaluationOutputComponents +\r
26             gl_MaxTessEvaluationTextureImageUnits +\r
27             gl_MaxTessEvaluationUniformComponents +\r
28             gl_MaxTessPatchComponents +\r
29             gl_MaxPatchVertices +\r
30             gl_MaxTessGenLevel;\r
31 \r
32     vec4 p = gl_in[1].gl_Position;\r
33     float ps = gl_in[1].gl_PointSize;\r
34     float cd = gl_in[1].gl_ClipDistance[2];\r
35 \r
36     int pvi = gl_PatchVerticesIn;\r
37     int pid = gl_PrimitiveID;\r
38     vec3 tc = gl_TessCoord;\r
39     float tlo = gl_TessLevelOuter[3];\r
40     float tli = gl_TessLevelInner[1];\r
41 \r
42     gl_Position = p;\r
43     gl_PointSize = ps;\r
44     gl_ClipDistance[2] = cd;\r
45 }\r
46 \r
47 smooth patch in vec4 badp1;         // ERROR\r
48 flat patch in vec4 badp2;           // ERROR\r
49 noperspective patch in vec4 badp3;  // ERROR\r
50 patch sample in vec3 badp4;         // ERROR\r
51 \r
52 #extension GL_ARB_separate_shader_objects : enable\r
53 \r
54 in gl_PerVertex
55 {
56 float gl_ClipDistance[1];
57 } gl_in[];                          // ERROR, no size
58 \r
59 in gl_PerVertex
60 {
61 float gl_ClipDistance[1];
62 } gl_in[gl_MaxPatchVertices];
63
64 layout(quads, cw) out;     // ERROR\r
65 layout(triangles) out;     // ERROR\r
66 layout(isolines) out;      // ERROR\r
67 layout(cw) out;            // ERROR\r
68 layout(fractional_odd_spacing) out;    // ERROR\r
69 layout(equal_spacing) out;             // ERROR\r
70 layout(fractional_even_spacing) out;   // ERROR\r
71 layout(point_mode) out;                // ERROR\r
72 \r