John Kessenich | 0f5e3ad | 2016-05-29 18:24:31 -0600 | [diff] [blame] | 1 | #version 420
|
| 2 |
|
| 3 | layout(local_size_x = 2) in; // ERROR, no compute
|
| 4 |
|
| 5 | #extension GL_ARB_compute_shader : enable
|
| 6 |
|
John Kessenich | d94c003 | 2016-05-30 19:29:40 -0600 | [diff] [blame] | 7 | layout(local_size_x = 2, local_size_y = 4, local_size_z = 6) in;
|
| 8 |
|
| 9 | shared vec3 sfoo;
|
| 10 |
|
| 11 | void 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 Kessenich | 548c3ad | 2016-05-30 19:38:39 -0600 | [diff] [blame] | 22 |
|
| 23 | barrier();
|
| 24 | memoryBarrier();
|
| 25 | memoryBarrierAtomicCounter();
|
| 26 | memoryBarrierBuffer();
|
| 27 | memoryBarrierImage();
|
| 28 | memoryBarrierShared();
|
| 29 | groupMemoryBarrier();
|
John Kessenich | d94c003 | 2016-05-30 19:29:40 -0600 | [diff] [blame] | 30 | } |