blob: e883f0b84d3a40676509cf63c3a58f55e33928f3 [file] [log] [blame]
John Kesseniche17ef842013-10-28 19:49:16 +00001#version 420 core
John Kessenich94974852013-10-24 22:41:04 +00002
3// testing input arrays without a gl_in[] block redeclaration, see 400.geom for with
4
5int i;
6
7void foo()
8{
9 gl_in.length(); // ERROR
10 gl_in[1].gl_Position;
11 gl_in[i].gl_Position; // ERROR
12}
13
14layout(triangles) in;
15
16in vec4 color3[3];
17
18void foo3()
19{
20 gl_in.length();
21 gl_in[i].gl_Position;
22 color3.length();
23}
John Kesseniche17ef842013-10-28 19:49:16 +000024
25uniform sampler2D s2D;
John Kessenich7c908d22013-12-18 03:06:24 +000026in vec2 coord[];
John Kesseniche17ef842013-10-28 19:49:16 +000027uniform vec4 v4;
28
29void foo4()
30{
31 const ivec2 offsets[5] =
32 {
33 ivec2(0,1),
34 ivec2(1,-2),
35 ivec2(0,3),
36 ivec2(-3,0),
37 ivec2(2,1)
38 };
39
John Kessenich7c908d22013-12-18 03:06:24 +000040 vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);
John Kesseniche17ef842013-10-28 19:49:16 +000041
42 offsets[i].xy = ivec2(3); // ERROR
43 v4.x = 3.2; // ERROR
44 v4.xy; // should have non-uniform type
45}
John Kessenichc7194812013-12-09 00:37:46 +000046
47out gl_PerVertex {
48 float gl_PointSize[1]; // ERROR, adding array
49 float gl_ClipDistance; // ERROR, removing array
50};