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 |
|
| 10 | int id = gl_InvocationID;
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 11 | }
|
John Kessenich | 94fdd11 | 2013-10-23 19:34:05 +0000 | [diff] [blame] | 12 |
|
| 13 | layout(invocations = 3) out outbn { int a; }; // ERROR, not on a block
|
| 14 | layout(max_vertices = 127, invocations = 4) out;
|
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;
|
| 20 | } gl_in[];
|
| 21 |
|
| 22 | void foo()
|
| 23 | {
|
| 24 | gl_in.length(); // ERROR
|
| 25 | gl_in[1].gl_Position;
|
| 26 | }
|
| 27 |
|
| 28 | in vec4 color[];
|
| 29 | in vec4 color2[];
|
| 30 | in vec4 colorS[3];
|
| 31 | in vec4 colorBad[4];
|
| 32 |
|
| 33 | void foo2()
|
| 34 | {
|
| 35 | color.length(); // ERROR
|
| 36 | colorS.length();
|
| 37 | }
|
| 38 |
|
| 39 | layout(triangles) in; // give ERROR just for colorBad
|
| 40 |
|
| 41 | in vec4 color[3];
|
| 42 | in vec4 color2[3];
|
| 43 | in vec4 colorbad2[2]; // ERROR
|
| 44 |
|
| 45 | void foo3()
|
| 46 | {
|
| 47 | gl_in.length();
|
| 48 | color.length();
|
| 49 | color2.length();
|
| 50 | colorS.length();
|
| 51 | }
|
John Kessenich | 521ca37 | 2013-12-05 20:58:16 +0000 | [diff] [blame^] | 52 |
|
| 53 | layout(location = 4) in vec4 cva[3];
|
| 54 | layout(location = 5) in vec4 cvb[3];
|
| 55 | layout(location = 2) in mat3 cmc[3]; // ERROR, collision
|