summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/glslang/src/Test/420.geom
blob: 8195a11a56b45de5a8b1511e5b0da93026abc095 (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
#version 420 core

// testing input arrays without a gl_in[] block redeclaration, see 400.geom for with

int i;

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

layout(triangles) in;

in vec4 color3[3];

void foo3()
{
    gl_in.length();
    gl_in[i].gl_Position;
    color3.length();
}

uniform sampler2D s2D;
in vec2 coord[];
uniform vec4 v4;

void foo4()
{
    const ivec2 offsets[5] =
    {
        ivec2(0,1),
        ivec2(1,-2),
        ivec2(0,3),
        ivec2(-3,0),
        ivec2(2,1)
    };

    vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);

    offsets[i].xy = ivec2(3);  // ERROR
    v4.x = 3.2;                // ERROR
    v4.xy;   // should have non-uniform type
}

out gl_PerVertex {
    float gl_PointSize[1];  // ERROR, adding array
    float gl_ClipDistance;  // ERROR, removing array
};

float foo5()
{
    return i;  // implicit conversion of return type
}