Merge pull request #2892 from greg-lunarg/mb
[platform/upstream/glslang.git] / Test / vk.relaxed.link2.frag
1 #version 460\r
2 \r
3 // default uniforms will be gathered into a uniform block\r
4 // final global block will merge uniforms from all linked files\r
5 uniform vec4 a;     // declared in both stages\r
6 uniform vec2 b2;    // declaration order swapped in other stage\r
7 uniform vec2 b1;\r
8 uniform vec4 c2;    // not delcared in other file\r
9 uniform vec4 d;\r
10 \r
11 layout (binding = 0) uniform atomic_uint counter3;\r
12 layout (binding = 0) uniform atomic_uint counter2;\r
13 \r
14 vec4 foo() {\r
15     uint j = atomicCounterIncrement(counter2) + atomicCounterDecrement(counter3);\r
16     vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c2 + d;\r
17 \r
18     return float(j) * v;\r
19 }