1#version 310 es 2 3layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; 4layout(binding = 0) buffer InOut 5{ 6 uint values[]; 7} sb_inout; 8 9void main (void) 10{ 11 uvec3 size = gl_NumWorkGroups * gl_WorkGroupSize; 12 uint numValuesPerInv = uint(sb_inout.values.length()) / (size.x*size.y*size.z); 13 uint groupNdx = size.x*size.y*gl_GlobalInvocationID.z + size.x*gl_GlobalInvocationID.y + gl_GlobalInvocationID.x; 14 uint offset = numValuesPerInv*groupNdx; 15 16 for (uint ndx = 0u; ndx < numValuesPerInv; ndx++) 17 sb_inout.values[offset + ndx] = ~sb_inout.values[offset + ndx]; 18} 19