aboutsummaryrefslogtreecommitdiff
path: root/Test/400.geom
blob: adb29f6370b95a4d32ece20f39fadd664bbd180a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#version 400 core

void main()
{
    EmitStreamVertex(1);
    EndStreamPrimitive(0);
    EmitVertex();
    EndPrimitive();
    int id = gl_InvocationID;
}

layout(invocations = 4) in outbn { int a; } bn[]; // ERROR, not on a block
layout(max_vertices = 127) out;
layout(invocations = 4) in;

#extension GL_ARB_separate_shader_objects : enable

in gl_PerVertex {      // testing input arrays with a block redeclaration, see 420.geom for without
    vec4 gl_Position;
    layout(std140, location = 3) patch float gl_PointSize; // ERRORs...
} gl_in[];

void foo()
{
    gl_in.length();  // ERROR
    gl_in[1].gl_Position;
}

in vec4 color[];
in vec4 color2[];
in vec4 colorS[3];
in vec4 colorBad[4];

void foo2()
{
    color.length(); // ERROR
    colorS.length();
}

layout(triangles) in;  // give ERROR just for colorBad

in vec4 color[3];
in vec4 color2[3];
in vec4 colorbad2[2];  // ERROR

void foo3()
{
    gl_in.length();
    color.length();
    color2.length();
    colorS.length();
}

layout(location = 4) in vec4 cva[3];
layout(location = 5) in vec4 cvb[3];
layout(location = 2) in mat3 cmc[3];  // ERROR, collision

patch in vec4 patchIn[];            // ERROR
patch out vec4 patchOut;            // ERROR

in float scalar;  // ERROR, no array

layout(max_vertices = 127, invocations = 4) out;      // ERROR
layout(invocations = 4, max_vertices = 127) in;       // ERROR
layout(max_vertices = 127, invocations = 4) uniform;  // 2 ERRORs

in inblockscalar {
    int a;
} inbls;  // ERROR, not an array

in inblocka {
    int a;
} inbla[17];  // ERROR, wrong array size