yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
5125eb58
16.4.0
1#version 450 2 3#extension GL_KHR_shader_subgroup_shuffle : enable 4 5layout ( local_size_x = 8 , local_size_y = 8 , local_size_z = 1 ) in ; 6 7layout ( binding = 0 ) buffer Buffers 8{ 9vec4 f4 ; 10ivec4 i4 ; 11uvec4 u4 ; 12dvec4 d4 ; 13} data [ 4 ] ; 14 15void main () 16{ 17uint invocation = ( gl_SubgroupInvocationID + gl_SubgroupSize ) % 4 ; 18 19data [ invocation ] . f4 . x = subgroupShuffle ( data [ 0 ] . f4 . x , invocation ) ; 20data [ invocation ] . f4 . xy = subgroupShuffle ( data [ 1 ] . f4 . xy , invocation ) ; 21data [ invocation ] . f4 . xyz = subgroupShuffle ( data [ 2 ] . f4 . xyz , invocation ) ; 22data [ invocation ] . f4 = subgroupShuffle ( data [ 3 ] . f4 , invocation ) ; 23 24data [ invocation ] . i4 . x = subgroupShuffle ( data [ 0 ] . i4 . x , invocation ) ; 25data [ invocation ] . i4 . xy = subgroupShuffle ( data [ 1 ] . i4 . xy , invocation ) ; 26data [ invocation ] . i4 . xyz = subgroupShuffle ( data [ 2 ] . i4 . xyz , invocation ) ; 27data [ invocation ] . i4 = subgroupShuffle ( data [ 3 ] . i4 , invocation ) ; 28 29data [ invocation ] . u4 . x = subgroupShuffle ( data [ 0 ] . u4 . x , invocation ) ; 30data [ invocation ] . u4 . xy = subgroupShuffle ( data [ 1 ] . u4 . xy , invocation ) ; 31data [ invocation ] . u4 . xyz = subgroupShuffle ( data [ 2 ] . u4 . xyz , invocation ) ; 32data [ invocation ] . u4 = subgroupShuffle ( data [ 3 ] . u4 , invocation ) ; 33 34data [ invocation ] . d4 . x = subgroupShuffle ( data [ 0 ] . d4 . x , invocation ) ; 35data [ invocation ] . d4 . xy = subgroupShuffle ( data [ 1 ] . d4 . xy , invocation ) ; 36data [ invocation ] . d4 . xyz = subgroupShuffle ( data [ 2 ] . d4 . xyz , invocation ) ; 37data [ invocation ] . d4 = subgroupShuffle ( data [ 3 ] . d4 , invocation ) ; 38 39data [ invocation ] . i4 . x = int ( subgroupShuffle ( data [ 0 ] . i4 . x < 0 , invocation )) ; 40data [ invocation ] . i4 . xy = ivec2 ( subgroupShuffle ( lessThan ( data [ 1 ] . i4 . xy , ivec2 ( 0 )) , invocation )) ; 41data [ invocation ] . i4 . xyz = ivec3 ( subgroupShuffle ( lessThan ( data [ 1 ] . i4 . xyz , ivec3 ( 0 )) , invocation )) ; 42data [ invocation ] . i4 = ivec4 ( subgroupShuffle ( lessThan ( data [ 1 ] . i4 , ivec4 ( 0 )) , invocation )) ; 43 44data [ invocation ] . f4 . x = subgroupShuffleXor ( data [ 0 ] . f4 . x , invocation ) ; 45data [ invocation ] . f4 . xy = subgroupShuffleXor ( data [ 1 ] . f4 . xy , invocation ) ; 46data [ invocation ] . f4 . xyz = subgroupShuffleXor ( data [ 2 ] . f4 . xyz , invocation ) ; 47data [ invocation ] . f4 = subgroupShuffleXor ( data [ 3 ] . f4 , invocation ) ; 48 49data [ invocation ] . i4 . x = subgroupShuffleXor ( data [ 0 ] . i4 . x , invocation ) ; 50data [ invocation ] . i4 . xy = subgroupShuffleXor ( data [ 1 ] . i4 . xy , invocation ) ; 51data [ invocation ] . i4 . xyz = subgroupShuffleXor ( data [ 2 ] . i4 . xyz , invocation ) ; 52data [ invocation ] . i4 = subgroupShuffleXor ( data [ 3 ] . i4 , invocation ) ; 53 54data [ invocation ] . u4 . x = subgroupShuffleXor ( data [ 0 ] . u4 . x , invocation ) ; 55data [ invocation ] . u4 . xy = subgroupShuffleXor ( data [ 1 ] . u4 . xy , invocation ) ; 56data [ invocation ] . u4 . xyz = subgroupShuffleXor ( data [ 2 ] . u4 . xyz , invocation ) ; 57data [ invocation ] . u4 = subgroupShuffleXor ( data [ 3 ] . u4 , invocation ) ; 58 59data [ invocation ] . d4 . x = subgroupShuffleXor ( data [ 0 ] . d4 . x , invocation ) ; 60data [ invocation ] . d4 . xy = subgroupShuffleXor ( data [ 1 ] . d4 . xy , invocation ) ; 61data [ invocation ] . d4 . xyz = subgroupShuffleXor ( data [ 2 ] . d4 . xyz , invocation ) ; 62data [ invocation ] . d4 = subgroupShuffleXor ( data [ 3 ] . d4 , invocation ) ; 63 64data [ invocation ] . i4 . x = int ( subgroupShuffleXor ( data [ 0 ] . i4 . x < 0 , invocation )) ; 65data [ invocation ] . i4 . xy = ivec2 ( subgroupShuffleXor ( lessThan ( data [ 1 ] . i4 . xy , ivec2 ( 0 )) , invocation )) ; 66data [ invocation ] . i4 . xyz = ivec3 ( subgroupShuffleXor ( lessThan ( data [ 1 ] . i4 . xyz , ivec3 ( 0 )) , invocation )) ; 67data [ invocation ] . i4 = ivec4 ( subgroupShuffleXor ( lessThan ( data [ 1 ] . i4 , ivec4 ( 0 )) , invocation )) ; 68}