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