File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -290,11 +290,29 @@ void main()
290
290
}
291
291
else if(IsTest(9))
292
292
{
293
- // Query function : unit tests
293
+ // Query functions : unit tests
294
294
data.x = float(gl_SubgroupSize);
295
295
data.y = float(gl_SubgroupInvocationID);
296
296
data.z = float(subgroupElect());
297
297
}
298
+ else if(IsTest(10))
299
+ {
300
+ // Vote functions : unit tests
301
+ data.x = float(subgroupAny(id*2 > id+10));
302
+ data.y = float(subgroupAll(id < gl_SubgroupSize));
303
+ if (id > 10)
304
+ {
305
+ data.z = float(subgroupAll(id > 10));
306
+ uvec4 ballot = subgroupBallot(id > 20);
307
+ data.w = bitCount(ballot.x) + bitCount(ballot.y) + bitCount(ballot.z) + bitCount(ballot.w);
308
+ }
309
+ else
310
+ {
311
+ data.z = float(subgroupAll(id > 3));
312
+ uvec4 ballot = subgroupBallot(id > 4);
313
+ data.w = bitCount(ballot.x) + bitCount(ballot.y) + bitCount(ballot.z) + bitCount(ballot.w);
314
+ }
315
+ }
298
316
SetOuput(data);
299
317
}
300
318
You can’t perform that action at this time.
0 commit comments