John Kessenich | edd1819 | 2015-04-17 21:47:07 +0000 | [diff] [blame] | 1 | #version 420 core
|
John Kessenich | f3e2a89 | 2013-12-13 18:38:43 +0000 | [diff] [blame] | 2 |
|
| 3 | #extension GL_ARB_separate_shader_objects : enable
|
| 4 |
|
| 5 | layout(vertices = 4) out;
|
| 6 |
|
| 7 | out gl_PerVertex {
|
| 8 | vec4 gl_Position;
|
| 9 | } gl_out[3]; // ERROR, wrong size
|
| 10 |
|
| 11 | out int a[gl_out.length()];
|
| 12 | out int outb[5]; // ERROR, wrong size
|
| 13 | out int outc[];
|
| 14 |
|
| 15 | void 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 Kessenich | 1be8063 | 2015-11-28 15:19:11 -0700 | [diff] [blame] | 25 | gl_out[gl_InvocationID].gl_Position = p;
|
| 26 | gl_out[gl_InvocationID].gl_PointSize = ps; // ERROR
|
John Kessenich | f3e2a89 | 2013-12-13 18:38:43 +0000 | [diff] [blame] | 27 | }
|
John Kessenich | 7c908d2 | 2013-12-18 03:06:24 +0000 | [diff] [blame] | 28 |
|
| 29 | out float outf; // ERROR, no array
|
John Kessenich | edd1819 | 2015-04-17 21:47:07 +0000 | [diff] [blame] | 30 |
|
| 31 | layout (location = 0) in dmat2x4 vs_tcs_first[];
|
| 32 | layout (location = 12) in dmat2x4 vs_tcs_last[];
|
| 33 |
|
| 34 | void foo()
|
| 35 | {
|
John Kessenich | 6dc09cd | 2015-04-17 22:03:30 +0000 | [diff] [blame] | 36 | if ((dmat2x4(dvec4(-0.625, -0.5, -0.375lf, -0.25), dvec4(-0.375, -0.25, -0.125, 0)) != vs_tcs_first[0]) ||
|
John Kessenich | edd1819 | 2015-04-17 21:47:07 +0000 | [diff] [blame] | 37 | (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 Kessenich | 494a02a | 2015-12-11 15:44:12 -0700 | [diff] [blame] | 41 | }
|
| 42 |
|
| 43 | layout(vertices = 0) out; // ERROR, can't be 0
|