yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
5125eb58
main
1#version 450 2 3#extension GL_KHR_shader_subgroup_clustered : enable 4 5layout ( local_size_x = 8 ) in ; 6 7layout ( binding = 0 ) buffer Buffers 8{ 9vec4 f4 ; 10ivec4 i4 ; 11uvec4 u4 ; 12dvec4 d4 ; 13} data [ 4 ] ; 14 15void main () 16{ 17int a = 1 ; 18const int aConst = 1 ; 19 20uint invocation = ( gl_SubgroupInvocationID + gl_SubgroupSize ) % 4 ; 21 22data [ invocation ] . f4 . xy = subgroupClusteredAdd ( data [ 1 ] . f4 . xy , 0 ) ; // ERROR, less than 1 23 24data [ invocation ] . f4 . x = subgroupClusteredMul ( data [ 0 ] . f4 . x , 3 ) ; // ERROR, not a power of 2 25 26data [ invocation ] . i4 . xy = subgroupClusteredMin ( data [ 1 ] . i4 . xy , 8 ) ; 27data [ invocation ] . i4 . xyz = subgroupClusteredMin ( data [ 2 ] . i4 . xyz , 6 ) ; // ERROR, not a power of 2 28 29data [ invocation ] . f4 . x = subgroupClusteredMax ( data [ 0 ] . f4 . x , - 1 ) ; // ERROR, less than 1 30 31data [ invocation ] . i4 = subgroupClusteredAnd ( data [ 3 ] . i4 , - 3 ) ; // ERROR, less than 1 32 33data [ invocation ] . i4 . x = subgroupClusteredOr ( data [ 0 ] . i4 . x , a ) ; // ERROR, not constant 34data [ invocation ] . i4 . xy = subgroupClusteredOr ( data [ 1 ] . i4 . xy , aConst ) ; 35 36data [ invocation ] . i4 . x = subgroupClusteredXor ( data [ 0 ] . i4 . x , 1 + a ) ; // ERROR, not constant 37data [ invocation ] . i4 . xy = subgroupClusteredXor ( data [ 1 ] . i4 . xy , aConst + a ) ; // ERROR, not constant 38data [ invocation ] . i4 . xyz = subgroupClusteredXor ( data [ 2 ] . i4 . xyz , 1 + aConst ) ; 39}