3 #extension GL_KHR_shader_subgroup_shuffle: enable
\r
4 #extension GL_EXT_shader_subgroup_extended_types_int8: enable
\r
5 #extension GL_EXT_shader_subgroup_extended_types_int16: enable
\r
6 #extension GL_EXT_shader_subgroup_extended_types_int64: enable
\r
7 #extension GL_EXT_shader_subgroup_extended_types_float16: enable
\r
9 layout (local_size_x = 8) in;
\r
11 layout(binding = 0) buffer Buffers
\r
24 uint invocation = (gl_SubgroupInvocationID + gl_SubgroupSize) % 4;
\r
26 data[invocation].i8.x = subgroupShuffle(data[0].i8.x, invocation);
\r
27 data[invocation].i8.xy = subgroupShuffle(data[1].i8.xy, invocation);
\r
28 data[invocation].i8.xyz = subgroupShuffle(data[2].i8.xyz, invocation);
\r
29 data[invocation].i8 = subgroupShuffle(data[3].i8, invocation);
\r
31 data[invocation].i8.x = subgroupShuffleXor(data[0].i8.x, invocation);
\r
32 data[invocation].i8.xy = subgroupShuffleXor(data[1].i8.xy, invocation);
\r
33 data[invocation].i8.xyz = subgroupShuffleXor(data[2].i8.xyz, invocation);
\r
34 data[invocation].i8 = subgroupShuffleXor(data[3].i8, invocation);
\r
36 data[invocation].u8.x = subgroupShuffle(data[0].u8.x, invocation);
\r
37 data[invocation].u8.xy = subgroupShuffle(data[1].u8.xy, invocation);
\r
38 data[invocation].u8.xyz = subgroupShuffle(data[2].u8.xyz, invocation);
\r
39 data[invocation].u8 = subgroupShuffle(data[3].u8, invocation);
\r
41 data[invocation].u8.x = subgroupShuffleXor(data[0].u8.x, invocation);
\r
42 data[invocation].u8.xy = subgroupShuffleXor(data[1].u8.xy, invocation);
\r
43 data[invocation].u8.xyz = subgroupShuffleXor(data[2].u8.xyz, invocation);
\r
44 data[invocation].u8 = subgroupShuffleXor(data[3].u8, invocation);
\r
46 data[invocation].i16.x = subgroupShuffle(data[0].i16.x, invocation);
\r
47 data[invocation].i16.xy = subgroupShuffle(data[1].i16.xy, invocation);
\r
48 data[invocation].i16.xyz = subgroupShuffle(data[2].i16.xyz, invocation);
\r
49 data[invocation].i16 = subgroupShuffle(data[3].i16, invocation);
\r
51 data[invocation].i16.x = subgroupShuffleXor(data[0].i16.x, invocation);
\r
52 data[invocation].i16.xy = subgroupShuffleXor(data[1].i16.xy, invocation);
\r
53 data[invocation].i16.xyz = subgroupShuffleXor(data[2].i16.xyz, invocation);
\r
54 data[invocation].i16 = subgroupShuffleXor(data[3].i16, invocation);
\r
56 data[invocation].u16.x = subgroupShuffle(data[0].u16.x, invocation);
\r
57 data[invocation].u16.xy = subgroupShuffle(data[1].u16.xy, invocation);
\r
58 data[invocation].u16.xyz = subgroupShuffle(data[2].u16.xyz, invocation);
\r
59 data[invocation].u16 = subgroupShuffle(data[3].u16, invocation);
\r
61 data[invocation].u16.x = subgroupShuffleXor(data[0].u16.x, invocation);
\r
62 data[invocation].u16.xy = subgroupShuffleXor(data[1].u16.xy, invocation);
\r
63 data[invocation].u16.xyz = subgroupShuffleXor(data[2].u16.xyz, invocation);
\r
64 data[invocation].u16 = subgroupShuffleXor(data[3].u16, invocation);
\r
66 data[invocation].i64.x = subgroupShuffle(data[0].i64.x, invocation);
\r
67 data[invocation].i64.xy = subgroupShuffle(data[1].i64.xy, invocation);
\r
68 data[invocation].i64.xyz = subgroupShuffle(data[2].i64.xyz, invocation);
\r
69 data[invocation].i64 = subgroupShuffle(data[3].i64, invocation);
\r
71 data[invocation].i64.x = subgroupShuffleXor(data[0].i64.x, invocation);
\r
72 data[invocation].i64.xy = subgroupShuffleXor(data[1].i64.xy, invocation);
\r
73 data[invocation].i64.xyz = subgroupShuffleXor(data[2].i64.xyz, invocation);
\r
74 data[invocation].i64 = subgroupShuffleXor(data[3].i64, invocation);
\r
76 data[invocation].u64.x = subgroupShuffle(data[0].u64.x, invocation);
\r
77 data[invocation].u64.xy = subgroupShuffle(data[1].u64.xy, invocation);
\r
78 data[invocation].u64.xyz = subgroupShuffle(data[2].u64.xyz, invocation);
\r
79 data[invocation].u64 = subgroupShuffle(data[3].u64, invocation);
\r
81 data[invocation].u64.x = subgroupShuffleXor(data[0].u64.x, invocation);
\r
82 data[invocation].u64.xy = subgroupShuffleXor(data[1].u64.xy, invocation);
\r
83 data[invocation].u64.xyz = subgroupShuffleXor(data[2].u64.xyz, invocation);
\r
84 data[invocation].u64 = subgroupShuffleXor(data[3].u64, invocation);
\r
86 data[invocation].f16.x = subgroupShuffle(data[0].f16.x, invocation);
\r
87 data[invocation].f16.xy = subgroupShuffle(data[1].f16.xy, invocation);
\r
88 data[invocation].f16.xyz = subgroupShuffle(data[2].f16.xyz, invocation);
\r
89 data[invocation].f16 = subgroupShuffle(data[3].f16, invocation);
\r
91 data[invocation].f16.x = subgroupShuffleXor(data[0].f16.x, invocation);
\r
92 data[invocation].f16.xy = subgroupShuffleXor(data[1].f16.xy, invocation);
\r
93 data[invocation].f16.xyz = subgroupShuffleXor(data[2].f16.xyz, invocation);
\r
94 data[invocation].f16 = subgroupShuffleXor(data[3].f16, invocation);
\r