blob: b9fd21c2fd5f7df81b4cc065a5ae268190dc5734 [file] [log] [blame]
John Kessenichedd18192015-04-17 21:47:07 +00001#version 420 core
John Kessenichf3e2a892013-12-13 18:38:43 +00002
3#extension GL_ARB_separate_shader_objects : enable
4
5layout(vertices = 4) out;
6
7out gl_PerVertex {
8 vec4 gl_Position;
9} gl_out[3]; // ERROR, wrong size
10
11out int a[gl_out.length()];
12out int outb[5]; // ERROR, wrong size
13out int outc[];
14
15void main()
16{
17 vec4 p = gl_in[1].gl_Position;
18 float ps = gl_in[1].gl_PointSize;
19 float cd = gl_in[1].gl_ClipDistance[2];
20
21 int pvi = gl_PatchVerticesIn;
22 int pid = gl_PrimitiveID;
23 int iid = gl_InvocationID;
24
John Kessenich1be80632015-11-28 15:19:11 -070025 gl_out[gl_InvocationID].gl_Position = p;
26 gl_out[gl_InvocationID].gl_PointSize = ps; // ERROR
John Kessenichf3e2a892013-12-13 18:38:43 +000027}
John Kessenich7c908d22013-12-18 03:06:24 +000028
29out float outf; // ERROR, no array
John Kessenichedd18192015-04-17 21:47:07 +000030
31layout (location = 0) in dmat2x4 vs_tcs_first[];
32layout (location = 12) in dmat2x4 vs_tcs_last[];
33
34void foo()
35{
John Kessenich6dc09cd2015-04-17 22:03:30 +000036 if ((dmat2x4(dvec4(-0.625, -0.5, -0.375lf, -0.25), dvec4(-0.375, -0.25, -0.125, 0)) != vs_tcs_first[0]) ||
John Kessenichedd18192015-04-17 21:47:07 +000037 (dmat2x4(dvec4(0.375, 0.5, 0.625, 0.75), dvec4(0.625, 0.75, 0.875, -0.625)) != vs_tcs_last[0]))
38 {
39 ;
40 }
John Kessenich494a02a2015-12-11 15:44:12 -070041}
42
43layout(vertices = 0) out; // ERROR, can't be 0