1#version 420 2 3layout(local_size_x = 2) in; // ERROR, no compute 4 5#extension GL_ARB_compute_shader : enable 6 7layout(local_size_x = 2, local_size_y = 4, local_size_z = 6) in; 8 9shared vec3 sfoo; 10 11void main() 12{ 13 sfoo = vec3(gl_WorkGroupSize.x, gl_WorkGroupSize.y, gl_WorkGroupSize.z); 14 sfoo += gl_WorkGroupSize + gl_NumWorkGroups + gl_WorkGroupID + gl_LocalInvocationID + gl_GlobalInvocationID; 15 sfoo *= gl_LocalInvocationIndex; 16 sfoo += gl_MaxComputeWorkGroupCount + gl_MaxComputeWorkGroupSize; 17 sfoo *= gl_MaxComputeUniformComponents + 18 gl_MaxComputeTextureImageUnits + 19 gl_MaxComputeImageUniforms + 20 gl_MaxComputeAtomicCounters + 21 gl_MaxComputeAtomicCounterBuffers; 22 23 barrier(); 24 memoryBarrier(); 25 memoryBarrierAtomicCounter(); 26 memoryBarrierBuffer(); 27 memoryBarrierImage(); 28 memoryBarrierShared(); 29 groupMemoryBarrier(); 30}