EndStreamPrimitive not supported when there is #extension GL_ARB_gpu_shader5
[platform/upstream/glslang.git] / Test / glsl.450.subgroupClusteredNeg.comp
1 #version 450\r
2 \r
3 #extension GL_KHR_shader_subgroup_clustered: enable\r
4 \r
5 layout (local_size_x = 8) in;\r
6 \r
7 layout(binding = 0) buffer Buffers\r
8 {\r
9     vec4  f4;\r
10     ivec4 i4;\r
11     uvec4 u4;\r
12     dvec4 d4;\r
13 } data[4];\r
14 \r
15 void main()\r
16 {\r
17     int a = 1;\r
18     const int aConst = 1;\r
19 \r
20     uint invocation = (gl_SubgroupInvocationID + gl_SubgroupSize) % 4;\r
21 \r
22     data[invocation].f4.xy  = subgroupClusteredAdd(data[1].f4.xy, 0);          // ERROR, less than 1\r
23 \r
24     data[invocation].f4.x   = subgroupClusteredMul(data[0].f4.x, 3);           // ERROR, not a power of 2\r
25 \r
26     data[invocation].i4.xy  = subgroupClusteredMin(data[1].i4.xy, 8);\r
27     data[invocation].i4.xyz = subgroupClusteredMin(data[2].i4.xyz, 6);         // ERROR, not a power of 2\r
28 \r
29     data[invocation].f4.x   = subgroupClusteredMax(data[0].f4.x, -1);          // ERROR, less than 1\r
30 \r
31     data[invocation].i4     = subgroupClusteredAnd(data[3].i4, -3);            // ERROR, less than 1\r
32 \r
33     data[invocation].i4.x   = subgroupClusteredOr(data[0].i4.x, a);            // ERROR, not constant\r
34     data[invocation].i4.xy  = subgroupClusteredOr(data[1].i4.xy, aConst);\r
35 \r
36     data[invocation].i4.x   = subgroupClusteredXor(data[0].i4.x, 1 + a);       // ERROR, not constant\r
37     data[invocation].i4.xy  = subgroupClusteredXor(data[1].i4.xy, aConst + a); // ERROR, not constant\r
38     data[invocation].i4.xyz = subgroupClusteredXor(data[2].i4.xyz, 1 + aConst);\r
39 }\r