John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 1 | #version 400 core
|
| 2 |
|
John Kessenich | 623833f | 2013-12-11 18:57:40 +0000 | [diff] [blame] | 3 | layout(vertices = 4) out; // ERROR
|
| 4 | layout(quads, cw) in;
|
| 5 | layout(triangles) in; // ERROR
|
| 6 | layout(isolines) in; // ERROR
|
| 7 |
|
John Kessenich | 623833f | 2013-12-11 18:57:40 +0000 | [diff] [blame] | 8 | layout(ccw) in; // ERROR
|
John Kessenich | 7c908d2 | 2013-12-18 03:06:24 +0000 | [diff] [blame] | 9 | layout(cw) in;
|
John Kessenich | 623833f | 2013-12-11 18:57:40 +0000 | [diff] [blame] | 10 |
|
| 11 | layout(fractional_odd_spacing) in;
|
| 12 | layout(equal_spacing) in; // ERROR
|
| 13 | layout(fractional_even_spacing) in; // ERROR
|
| 14 |
|
| 15 | layout(point_mode) in;
|
| 16 |
|
John Kessenich | 116c30b | 2013-12-12 01:25:37 +0000 | [diff] [blame] | 17 | patch in vec4 patchIn;
|
| 18 | patch out vec4 patchOut; // ERROR
|
| 19 |
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 20 | void main()
|
| 21 | {
|
| 22 | barrier(); // ERROR
|
John Kessenich | 623833f | 2013-12-11 18:57:40 +0000 | [diff] [blame] | 23 |
|
| 24 | int a = gl_MaxTessEvaluationInputComponents +
|
| 25 | gl_MaxTessEvaluationOutputComponents +
|
| 26 | gl_MaxTessEvaluationTextureImageUnits +
|
| 27 | gl_MaxTessEvaluationUniformComponents +
|
| 28 | gl_MaxTessPatchComponents +
|
| 29 | gl_MaxPatchVertices +
|
| 30 | gl_MaxTessGenLevel;
|
| 31 |
|
| 32 | vec4 p = gl_in[1].gl_Position;
|
| 33 | float ps = gl_in[1].gl_PointSize;
|
| 34 | float cd = gl_in[1].gl_ClipDistance[2];
|
| 35 |
|
| 36 | int pvi = gl_PatchVerticesIn;
|
| 37 | int pid = gl_PrimitiveID;
|
| 38 | vec3 tc = gl_TessCoord;
|
| 39 | float tlo = gl_TessLevelOuter[3];
|
| 40 | float tli = gl_TessLevelInner[1];
|
| 41 |
|
| 42 | gl_Position = p;
|
| 43 | gl_PointSize = ps;
|
| 44 | gl_ClipDistance[2] = cd;
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 45 | }
|
John Kessenich | 116c30b | 2013-12-12 01:25:37 +0000 | [diff] [blame] | 46 |
|
| 47 | smooth patch in vec4 badp1; // ERROR
|
| 48 | flat patch in vec4 badp2; // ERROR
|
| 49 | noperspective patch in vec4 badp3; // ERROR
|
| 50 | patch sample in vec3 badp4; // ERROR
|
John Kessenich | 27151ef | 2013-12-13 19:26:54 +0000 | [diff] [blame] | 51 |
|
| 52 | #extension GL_ARB_separate_shader_objects : enable
|
| 53 |
|
John Kessenich | 6e76bdc | 2015-06-19 23:03:32 +0000 | [diff] [blame] | 54 | in gl_PerVertex // ERROR, no size
|
John Kessenich | 782aa83 | 2014-02-12 05:15:49 +0000 | [diff] [blame] | 55 | {
|
John Kessenich | 6e76bdc | 2015-06-19 23:03:32 +0000 | [diff] [blame] | 56 | float gl_ClipDistance[1];
|
| 57 | } gl_in[];
|
John Kessenich | 27151ef | 2013-12-13 19:26:54 +0000 | [diff] [blame] | 58 |
|
John Kessenich | 6e76bdc | 2015-06-19 23:03:32 +0000 | [diff] [blame] | 59 | in gl_PerVertex // ERROR, second redeclaration of gl_in
|
John Kessenich | 782aa83 | 2014-02-12 05:15:49 +0000 | [diff] [blame] | 60 | {
|
John Kessenich | 6e76bdc | 2015-06-19 23:03:32 +0000 | [diff] [blame] | 61 | float gl_ClipDistance[1];
|
John Kessenich | 782aa83 | 2014-02-12 05:15:49 +0000 | [diff] [blame] | 62 | } gl_in[];
|
| 63 |
|
John Kessenich | 7c908d2 | 2013-12-18 03:06:24 +0000 | [diff] [blame] | 64 | layout(quads, cw) out; // ERROR
|
| 65 | layout(triangles) out; // ERROR
|
| 66 | layout(isolines) out; // ERROR
|
| 67 | layout(cw) out; // ERROR
|
| 68 | layout(fractional_odd_spacing) out; // ERROR
|
| 69 | layout(equal_spacing) out; // ERROR
|
| 70 | layout(fractional_even_spacing) out; // ERROR
|
| 71 | layout(point_mode) out; // ERROR
|
| 72 |
|
John Kessenich | 08d1824 | 2013-12-20 18:36:27 +0000 | [diff] [blame] | 73 | in vec2 ina; // ERROR, not array
|
| 74 | in vec2 inb[];
|
| 75 | in vec2 inc[18]; // ERROR, wrong size
|
| 76 | in vec2 ind[gl_MaxPatchVertices];
|
| 77 |
|
| 78 | in testbla {
|
| 79 | int f;
|
| 80 | } bla; // ERROR, not array
|
| 81 |
|
| 82 | in testblb {
|
| 83 | int f;
|
| 84 | } blb[];
|
| 85 |
|
| 86 | in testblc {
|
| 87 | int f;
|
| 88 | } blc[18]; // ERROR wrong size
|
| 89 |
|
| 90 | in testbld {
|
| 91 | int f;
|
| 92 | } bld[gl_MaxPatchVertices];
|
| 93 |
|
| 94 | layout(location = 23) in vec4 ivla[];
|
| 95 | layout(location = 24) in vec4 ivlb[];
|
| 96 | layout(location = 24) in vec4 ivlc[]; // ERROR
|
| 97 |
|
| 98 | layout(location = 23) out vec4 ovla[2];
|
| 99 | layout(location = 24) out vec4 ovlb[2]; // ERROR
|
John Kessenich | d7dfe2c | 2014-05-06 22:58:55 +0000 | [diff] [blame] | 100 |
|
John Kessenich | 6e76bdc | 2015-06-19 23:03:32 +0000 | [diff] [blame] | 101 | in float gl_TessLevelOuter[4]; // ERROR, can't redeclare
|
John Kessenich | 7169338 | 2014-10-08 21:57:17 +0000 | [diff] [blame] | 102 |
|
| 103 | patch in pinbn {
|
| 104 | int a;
|
| 105 | } pinbi;
|