Merge pull request #3031 from rg3igalia/sub-group-size-arb-flat-fix
[platform/upstream/glslang.git] / Test / link.multiAnonBlocksInvalid.0.0.vert
1 #version 430
2
3 // Error: Block has different members
4 layout (std140) uniform Block
5 {
6         mat4 uProj;
7 };
8
9 // Error: BufferBlock has different members
10 buffer BufferBlock
11 {
12         vec4 b;
13 };
14
15 // Error: Vertex has different members
16 out Vertex
17 {
18         vec4 v1;
19 };
20
21 // Error: ColorBlock has different members
22 layout (std140) uniform ColorBlock
23 {
24         vec4 color1;
25         vec4 color2;
26         // Error, redeclare varaible in another anonymous block
27         vec4 v1;
28 };
29
30 // Error: NamedBlock is anonymous in other compilation unit
31 layout (std140) uniform NamedBlock
32 {
33         mat4 m;
34 } myName;
35
36 vec4 getWorld();
37 vec4 getColor2();
38
39 out vec4 oColor;
40
41 // Error: redeclare varaibles that are in anonymous blocks
42 out vec4 v1;
43 uniform mat4 uProj;
44
45 void
46 main()
47 {
48         oColor = color1 * getColor2();
49         v1 = color1;
50
51         gl_Position = uProj * getWorld();
52 }