yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

greg-lunargMerge pull request #2576 from KhronosGroup/revert-2569-revert-2242-GL_EXT_vulkan_glsl_relaxedb2e5b5c5

main
630 B19 linesraw
1#version 460
2
3// default uniforms will be gathered into a uniform block
4// final global block will merge uniforms from all linked files
5uniform vec4 a;     // declared in both stages
6uniform vec2 b2;    // declaration order swapped in other stage
7uniform vec2 b1;
8uniform vec4 c2;    // not delcared in other file
9uniform vec4 d;
10
11layout (binding = 0) uniform atomic_uint counter3;
12layout (binding = 0) uniform atomic_uint counter2;
13
14vec4 foo() {
15    uint j = atomicCounterIncrement(counter2) + atomicCounterDecrement(counter3);
16    vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c2 + d;
17
18    return float(j) * v;
19}