3 #extension GL_KHR_shader_subgroup_vote: enable
\r
5 layout (local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
\r
7 layout(binding = 0) buffer Buffers
\r
18 uint invocation = (gl_SubgroupInvocationID + gl_SubgroupSize) % 4;
\r
20 if (subgroupAll(data[invocation].r < 0))
\r
22 data[invocation].r = int(subgroupAllEqual(data[0].f4.x));
\r
23 data[invocation].r = int(subgroupAllEqual(data[1].f4.xy));
\r
24 data[invocation].r = int(subgroupAllEqual(data[2].f4.xyz));
\r
25 data[invocation].r = int(subgroupAllEqual(data[3].f4));
\r
27 data[invocation].r = int(subgroupAllEqual(data[0].i4.x));
\r
28 data[invocation].r = int(subgroupAllEqual(data[1].i4.xy));
\r
29 data[invocation].r = int(subgroupAllEqual(data[2].i4.xyz));
\r
30 data[invocation].r = int(subgroupAllEqual(data[3].i4));
\r
32 data[invocation].r = int(subgroupAllEqual(data[0].u4.x));
\r
33 data[invocation].r = int(subgroupAllEqual(data[1].u4.xy));
\r
34 data[invocation].r = int(subgroupAllEqual(data[2].u4.xyz));
\r
35 data[invocation].r = int(subgroupAllEqual(data[3].u4));
\r
37 else if (subgroupAny(data[invocation].r < 0))
\r
39 data[invocation].r = int(subgroupAllEqual(data[0].d4.x));
\r
40 data[invocation].r = int(subgroupAllEqual(data[1].d4.xy));
\r
41 data[invocation].r = int(subgroupAllEqual(data[2].d4.xyz));
\r
42 data[invocation].r = int(subgroupAllEqual(data[3].d4));
\r
44 data[invocation].r = int(int(subgroupAllEqual(data[0].i4.x < 0)));
\r
45 data[invocation].r = int(ivec2(subgroupAllEqual(lessThan(data[1].i4.xy, ivec2(0)))));
\r
46 data[invocation].r = int(ivec3(subgroupAllEqual(lessThan(data[1].i4.xyz, ivec3(0)))));
\r
47 data[invocation].r = int(ivec4(subgroupAllEqual(lessThan(data[1].i4, ivec4(0)))));
\r