Merge pull request #2865 from alan-baker/update-license
[platform/upstream/glslang.git] / Test / link.vk.multiBlocksValid.1.1.geom
1 #version 430
2
3 layout (triangles) in;
4 layout (triangle_strip, max_vertices = 3) out;
5
6 // OK: different instance names is allowed
7 layout (std140, binding = 1) uniform ColorBlock
8 {
9         vec4 color1;
10         bool b;
11         vec4 color2;
12         vec4 color3;
13 } uColor;
14
15 // OK: different instance names is allowed
16 layout (std430, binding = 1) buffer BufferBlock
17 {
18         mat4 p;
19 } uBuffer;
20
21 // OK: different instance names is allowed
22 layout (std140, binding = 0) uniform MatrixBlock
23 {
24         mat4 uProj;
25         mat4 uWorld;
26 } uMatrix;
27
28 // OK, it's allowed for input/output interfaces to
29 // be anonymous is one unit and not in another
30 out Vertex
31 {
32         vec4 val1;
33 };
34
35 in Vertex
36 {
37         vec4 v1;
38         vec4 v2;
39 } iVV[];
40
41
42 in vec4 P[3];
43
44 vec4 getColor2()
45 {
46         return uColor.color2;
47 }
48
49 vec4 getWorld(int i)
50 {
51         val1 = vec4(1);
52         return uMatrix.uWorld * iVV[i].v1;
53 }
54