blob: adb29f6370b95a4d32ece20f39fadd664bbd180a [file] [log] [blame]
John Kessenichc0275792013-08-09 17:14:49 +00001#version 400 core
2
3void main()
4{
5 EmitStreamVertex(1);
6 EndStreamPrimitive(0);
7 EmitVertex();
8 EndPrimitive();
John Kesseniche7c59c12013-10-16 22:28:35 +00009 int id = gl_InvocationID;
John Kessenichc0275792013-08-09 17:14:49 +000010}
John Kessenich94fdd112013-10-23 19:34:05 +000011
John Kessenich7c908d22013-12-18 03:06:24 +000012layout(invocations = 4) in outbn { int a; } bn[]; // ERROR, not on a block
13layout(max_vertices = 127) out;
14layout(invocations = 4) in;
John Kessenich94974852013-10-24 22:41:04 +000015
16#extension GL_ARB_separate_shader_objects : enable
17
18in gl_PerVertex { // testing input arrays with a block redeclaration, see 420.geom for without
19 vec4 gl_Position;
John Kessenichc7194812013-12-09 00:37:46 +000020 layout(std140, location = 3) patch float gl_PointSize; // ERRORs...
John Kessenich94974852013-10-24 22:41:04 +000021} gl_in[];
22
23void foo()
24{
25 gl_in.length(); // ERROR
26 gl_in[1].gl_Position;
27}
28
29in vec4 color[];
30in vec4 color2[];
31in vec4 colorS[3];
32in vec4 colorBad[4];
33
34void foo2()
35{
36 color.length(); // ERROR
37 colorS.length();
38}
39
40layout(triangles) in; // give ERROR just for colorBad
41
42in vec4 color[3];
43in vec4 color2[3];
44in vec4 colorbad2[2]; // ERROR
45
46void foo3()
47{
48 gl_in.length();
49 color.length();
50 color2.length();
51 colorS.length();
52}
John Kessenich521ca372013-12-05 20:58:16 +000053
54layout(location = 4) in vec4 cva[3];
55layout(location = 5) in vec4 cvb[3];
56layout(location = 2) in mat3 cmc[3]; // ERROR, collision
John Kessenich116c30b2013-12-12 01:25:37 +000057
John Kessenich7c908d22013-12-18 03:06:24 +000058patch in vec4 patchIn[]; // ERROR
59patch out vec4 patchOut; // ERROR
60
61in float scalar; // ERROR, no array
62
63layout(max_vertices = 127, invocations = 4) out; // ERROR
64layout(invocations = 4, max_vertices = 127) in; // ERROR
65layout(max_vertices = 127, invocations = 4) uniform; // 2 ERRORs
66
67in inblockscalar {
68 int a;
69} inbls; // ERROR, not an array
70
71in inblocka {
72 int a;
73} inbla[17]; // ERROR, wrong array size