1#version 430 core
2
3layout(local_size_x = 2) in;
4layout(local_size_x = 16) in;     // ERROR, changing
5layout(local_size_z = 4096) in;   // ERROR, too large
6layout(local_size_x = 2) in;
7
8const int total = gl_MaxComputeWorkGroupCount.y
9                + gl_MaxComputeUniformComponents
10                + gl_MaxComputeTextureImageUnits
11                + gl_MaxComputeImageUniforms
12                + gl_MaxComputeAtomicCounters
13                + gl_MaxComputeAtomicCounterBuffers;
14
15buffer ShaderStorageBlock
16{
17    int value;
18    float values[];
19};
20
21buffer InvalidShaderStorageBlock
22{
23    float values[];
24    int value;
25} invalid;
26
27void main()
28{
29    barrier();
30    memoryBarrier();
31    memoryBarrierAtomicCounter();
32    memoryBarrierBuffer();
33    memoryBarrierShared();
34    memoryBarrierImage();
35    groupMemoryBarrier();
36    value = int(values[gl_LocalInvocationIndex]);
37
38    int a;
39    if (a > 10)
40        barrier();
41}
42
43layout(location = 2) in vec3 v3;      // ERROR
44in float f;                           // ERROR
45out float fo;                         // ERROR
46
47shared vec4 s;
48layout(location = 2) shared vec4 sl;  // ERROR
49shared float fs = 4.2;                // ERROR
50
51layout(local_size_y = 1) in;
52layout(local_size_y = 2) in;     // ERROR, changing
53layout(local_size_y = 1) in;
54layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) out;  // ERROR
55
56int arrX[gl_WorkGroupSize.x];
57int arrY[gl_WorkGroupSize.y];
58int arrZ[gl_WorkGroupSize.z];
59
60readonly buffer roblock
61{
62    int value;
63    float values[];
64} ro;
65
66void foo()
67{
68    ro.values[2] = 4.7;             // ERROR, readonly
69    ro.values.length();
70    barrier();
71}
72
73uniform double roll;
74uniform writeonly image2D destTex;
75void fooaoeu() {
76     ivec2 storePos = ivec2(gl_GlobalInvocationID.xy);
77     double localCoef = length(vec2(ivec2(gl_LocalInvocationID.xy)-8)/8.0);
78     dvec4 aa = dvec4(0.4, 0.2, 0.3, 0.4);
79     double globalCoef = 1.0;
80     int i = globalCoef;            // ERROR, can't convert from double to int
81     double di = i;
82}
83
84in inb {     // ERROR
85    int a;
86} inbi;
87
88out outb {     // ERROR
89    int a;
90} outbi;
91