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