File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,40 @@ void main()
337
337
data.w = subgroupExclusiveMul(1 + data.y);
338
338
}
339
339
}
340
+ else if(IsTest(13))
341
+ {
342
+ // Reduction functions : unit tests
343
+ if (id >= 2 && id <= 20)
344
+ {
345
+ data.x = float(subgroupMax(id));
346
+ data.y = float(subgroupMin(id));
347
+ data.z = float(subgroupMul(id));
348
+ data.w = float(subgroupAdd(id));
349
+ }
350
+ }
351
+ else if(IsTest(14))
352
+ {
353
+ // Reduction functions : unit tests
354
+ if (id >= 2 && id <= 20)
355
+ {
356
+ uvec4 bits = subgroupBallot(id > 23);
357
+ data.x = float(subgroupBallotBitCount(bits));
358
+ data.y = float(subgroupAnd(id));
359
+ data.z = float(subgroupOr(id));
360
+ data.w = float(subgroupXor(id));
361
+ }
362
+ }
363
+ else if(IsTest(15))
364
+ {
365
+ // Reduction functions : unit tests
366
+ if (id > 13)
367
+ {
368
+ data.x = float(subgroupAllEqual(id > 15));
369
+ data.y = float(subgroupAllEqual(id < 23));
370
+ data.z = float(subgroupAllEqual(id >= 25));
371
+ data.w = float(subgroupAllEqual(id >= 28));
372
+ }
373
+ }
340
374
SetOuput(data);
341
375
}
342
376
You can’t perform that action at this time.
0 commit comments