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