John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 1 | #version 400 core
|
| 2 |
|
| 3 | void main()
|
| 4 | {
|
| 5 | EmitStreamVertex(1);
|
| 6 | EndStreamPrimitive(0);
|
| 7 | EmitVertex();
|
| 8 | EndPrimitive();
|
John Kessenich | e7c59c1 | 2013-10-16 22:28:35 +0000 | [diff] [blame] | 9 | int id = gl_InvocationID;
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 10 | }
|
John Kessenich | 94fdd11 | 2013-10-23 19:34:05 +0000 | [diff] [blame] | 11 |
|
John Kessenich | 7c908d2 | 2013-12-18 03:06:24 +0000 | [diff] [blame] | 12 | layout(invocations = 4) in outbn { int a; } bn[]; // ERROR, not on a block
|
| 13 | layout(max_vertices = 127) out;
|
| 14 | layout(invocations = 4) in;
|
John Kessenich | 9497485 | 2013-10-24 22:41:04 +0000 | [diff] [blame] | 15 |
|
| 16 | #extension GL_ARB_separate_shader_objects : enable
|
| 17 |
|
| 18 | in gl_PerVertex { // testing input arrays with a block redeclaration, see 420.geom for without
|
| 19 | vec4 gl_Position;
|
John Kessenich | c719481 | 2013-12-09 00:37:46 +0000 | [diff] [blame] | 20 | layout(std140, location = 3) patch float gl_PointSize; // ERRORs...
|
John Kessenich | 9497485 | 2013-10-24 22:41:04 +0000 | [diff] [blame] | 21 | } gl_in[];
|
| 22 |
|
| 23 | void foo()
|
| 24 | {
|
| 25 | gl_in.length(); // ERROR
|
| 26 | gl_in[1].gl_Position;
|
| 27 | }
|
| 28 |
|
| 29 | in vec4 color[];
|
| 30 | in vec4 color2[];
|
| 31 | in vec4 colorS[3];
|
| 32 | in vec4 colorBad[4];
|
| 33 |
|
| 34 | void foo2()
|
| 35 | {
|
| 36 | color.length(); // ERROR
|
| 37 | colorS.length();
|
| 38 | }
|
| 39 |
|
| 40 | layout(triangles) in; // give ERROR just for colorBad
|
| 41 |
|
| 42 | in vec4 color[3];
|
| 43 | in vec4 color2[3];
|
| 44 | in vec4 colorbad2[2]; // ERROR
|
| 45 |
|
| 46 | void foo3()
|
| 47 | {
|
| 48 | gl_in.length();
|
| 49 | color.length();
|
| 50 | color2.length();
|
| 51 | colorS.length();
|
| 52 | }
|
John Kessenich | 521ca37 | 2013-12-05 20:58:16 +0000 | [diff] [blame] | 53 |
|
| 54 | layout(location = 4) in vec4 cva[3];
|
| 55 | layout(location = 5) in vec4 cvb[3];
|
| 56 | layout(location = 2) in mat3 cmc[3]; // ERROR, collision
|
John Kessenich | 116c30b | 2013-12-12 01:25:37 +0000 | [diff] [blame] | 57 |
|
John Kessenich | 7c908d2 | 2013-12-18 03:06:24 +0000 | [diff] [blame] | 58 | patch in vec4 patchIn[]; // ERROR
|
| 59 | patch out vec4 patchOut; // ERROR
|
| 60 |
|
| 61 | in float scalar; // ERROR, no array
|
| 62 |
|
| 63 | layout(max_vertices = 127, invocations = 4) out; // ERROR
|
| 64 | layout(invocations = 4, max_vertices = 127) in; // ERROR
|
| 65 | layout(max_vertices = 127, invocations = 4) uniform; // 2 ERRORs
|
| 66 |
|
| 67 | in inblockscalar {
|
| 68 | int a;
|
| 69 | } inbls; // ERROR, not an array
|
| 70 |
|
| 71 | in inblocka {
|
| 72 | int a;
|
| 73 | } inbla[17]; // ERROR, wrong array size
|