blob: d92e6f0d0e5a26abe7b0dfe1c759a7943eac56b2 [file] [log] [blame]
John Kessenich0f5e3ad2016-05-29 18:24:31 -06001#version 420
2
3layout(local_size_x = 2) in; // ERROR, no compute
4
5#extension GL_ARB_compute_shader : enable
6
John Kessenichd94c0032016-05-30 19:29:40 -06007layout(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;
John Kessenich548c3ad2016-05-30 19:38:39 -060022
23 barrier();
24 memoryBarrier();
25 memoryBarrierAtomicCounter();
26 memoryBarrierBuffer();
27 memoryBarrierImage();
28 memoryBarrierShared();
29 groupMemoryBarrier();
John Kessenichd94c0032016-05-30 19:29:40 -060030}