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;
|
| 4 | int outa[gl_out.length()];
|
| 5 |
|
| 6 | layout(quads) in; // ERROR
|
| 7 | layout(ccw) out; // ERROR
|
| 8 | layout(fractional_even_spacing) in; // ERROR
|
| 9 |
|
John Kessenich | 116c30b | 2013-12-12 01:25:37 +0000 | [diff] [blame] | 10 | patch in vec4 patchIn; // ERROR
|
| 11 | patch out vec4 patchOut;
|
John Kessenich | 623833f | 2013-12-11 18:57:40 +0000 | [diff] [blame] | 12 |
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 13 | void main()
|
| 14 | {
|
| 15 | barrier();
|
John Kessenich | 623833f | 2013-12-11 18:57:40 +0000 | [diff] [blame] | 16 |
|
| 17 | int a = gl_MaxTessControlInputComponents +
|
| 18 | gl_MaxTessControlOutputComponents +
|
| 19 | gl_MaxTessControlTextureImageUnits +
|
| 20 | gl_MaxTessControlUniformComponents +
|
| 21 | gl_MaxTessControlTotalOutputComponents;
|
| 22 |
|
| 23 | vec4 p = gl_in[1].gl_Position;
|
| 24 | float ps = gl_in[1].gl_PointSize;
|
| 25 | float cd = gl_in[1].gl_ClipDistance[2];
|
| 26 |
|
| 27 | int pvi = gl_PatchVerticesIn;
|
| 28 | int pid = gl_PrimitiveID;
|
| 29 | int iid = gl_InvocationID;
|
| 30 |
|
| 31 | gl_out[1].gl_Position = p;
|
| 32 | gl_out[1].gl_PointSize = ps;
|
| 33 | gl_out[1].gl_ClipDistance[1] = cd;
|
| 34 |
|
| 35 | gl_TessLevelOuter[3] = 3.2;
|
| 36 | gl_TessLevelInner[1] = 1.3;
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 37 | }
|
John Kessenich | f3e2a89 | 2013-12-13 18:38:43 +0000 | [diff] [blame] | 38 |
|
| 39 | layout(vertices = 4) in; // ERROR
|
| 40 | layout(vertices = 5) out; // ERROR
|
| 41 |
|
| 42 | void foo()
|
| 43 | {
|
| 44 | gl_out[4].gl_PointSize; // ERROR
|
John Kessenich | 08d1824 | 2013-12-20 18:36:27 +0000 | [diff] [blame] | 45 | }
|
| 46 |
|
| 47 | in vec2 ina; // ERROR, not array
|
| 48 | in vec2 inb[];
|
| 49 | in vec2 inc[18]; // ERROR, wrong size
|
| 50 | in vec2 ind[gl_MaxPatchVertices];
|
John Kessenich | c7776ec | 2014-01-26 01:37:13 +0000 | [diff] [blame] | 51 |
|
| 52 | #extension GL_ARB_separate_shader_objects : enable
|
John Kessenich | 08d1824 | 2013-12-20 18:36:27 +0000 | [diff] [blame] | 53 |
|
| 54 | layout(location = 3) in vec4 ivla[];
|
| 55 | layout(location = 4) in vec4 ivlb[];
|
| 56 | layout(location = 4) in vec4 ivlc[]; // ERROR
|
| 57 |
|
| 58 | layout(location = 3) out vec4 ovla[];
|
| 59 | layout(location = 4) out vec4 ovlb[];
|
| 60 | layout(location = 4) out vec4 ovlc[]; // ERROR
|