yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
34170157
16.3.0
1#version 310 es 2 3layout ( local_size_x_id = 18 , local_size_z_id = 19 ) in ; 4 5layout ( local_size_x = 2 ) in ; 6layout ( local_size_y = 5 ) in ; 7layout ( local_size_z = 7 ) in ; 8 9const int total = gl_MaxComputeWorkGroupCount . x 10+ gl_MaxComputeWorkGroupCount . y 11+ gl_MaxComputeWorkGroupCount . z 12+ gl_MaxComputeUniformComponents 13+ gl_MaxComputeTextureImageUnits ; 14 15shared vec4 s [ total ] ; 16 17int arrX [ gl_WorkGroupSize . x ] ; 18int arrY [ gl_WorkGroupSize . y ] ; 19int arrZ [ gl_WorkGroupSize . z ] ; 20 21layout ( binding = 0 , set = 0 ) buffer bName { 22int size ; 23uvec3 count ; 24vec4 data [] ; 25} bInst ; 26 27void main () 28{ 29barrier () ; 30 31bInst . data [ bInst . size / 2 ] *= vec4 ( 7.0 ) ; 32 33memoryBarrier () ; 34groupMemoryBarrier () ; 35memoryBarrierShared () ; 36memoryBarrierBuffer () ; 37 38s [ 3 ] = vec4 ( 0 , arrX [ 0 ] , arrY [ 0 ] , arrZ [ 0 ]) ; 39bInst . count = gl_NumWorkGroups + gl_WorkGroupSize + gl_WorkGroupID + gl_LocalInvocationID + 40gl_GlobalInvocationID * gl_LocalInvocationIndex ; 41 42atomicAdd ( bInst . size , 2 ) ; 43atomicMin ( bInst . size , 2 ) ; 44atomicMax ( bInst . size , 2 ) ; 45atomicAnd ( bInst . size , 2 ) ; 46atomicOr ( bInst . size , 2 ) ; 47atomicXor ( bInst . size , 2 ) ; 48atomicExchange ( bInst . size , 2 ) ; 49atomicCompSwap ( bInst . size , 5 , 2 ) ; 50}