Merge pull request #3031 from rg3igalia/sub-group-size-arb-flat-fix
[platform/upstream/glslang.git] / Test / link.vk.multiBlocksValid.0.0.vert
1 #version 430
2
3 // OK: different instance names is allowed in other unit
4 layout (std140, binding = 0) uniform MatrixBlock
5 {
6         mat4 uProj;
7         mat4 uWorld;
8 } uM;
9
10 // OK: other unit has it as anonymous, but that is allowed
11 out Vertex
12 {
13         vec4 v1;
14         vec4 v2;
15 } oV;
16
17 // OK: different instance names is allowed in other unit
18 layout (std140, binding = 1) uniform ColorBlock
19 {
20         vec4 color1;
21         bool b;
22         vec4 color2;
23         vec4 color3;
24 } uC;
25
26 // OK: different instance names is allowed in other unit
27 layout (std430, binding = 1) buffer BufferBlock
28 {
29         mat4 p;
30 } uBuf;
31
32 layout (std430, binding = 0) buffer SecondaryColorBlock
33 {
34         vec4 c;
35 } uColorBuf;
36
37 vec4 getWorld();
38 vec4 getColor2();
39
40 out vec4 oColor;
41
42 void
43 main()
44 {
45         oColor = uC.color1 * getColor2() * uColorBuf.c;
46         oV.v1 = uC.color1;
47
48         gl_Position = uM.uProj * getWorld();
49 }