Skip to content

Commit b8f1d01

Browse files
committed
Add VK_Workgroup_Zoo unit tests for subgroup Broadcast/Shuffle ops
subgroupBroadcastFirst() subgroupBroadcast() subgroupShuffle()
1 parent 0e35fe6 commit b8f1d01

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

util/test/demos/vk/vk_subgroup_zoo.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,17 @@ void main()
313313
data.w = bitCount(ballot.x) + bitCount(ballot.y) + bitCount(ballot.z) + bitCount(ballot.w);
314314
}
315315
}
316+
else if(IsTest(11))
317+
{
318+
// Broadcast functions : unit tests
319+
if (id >= 2 && id <= 20)
320+
{
321+
data.x = subgroupBroadcastFirst(id);
322+
data.y = subgroupBroadcast(id, 5);
323+
data.z = subgroupShuffle(id, id);
324+
data.w = subgroupShuffle(data.x, 2+id%3);
325+
}
326+
}
316327
SetOuput(data);
317328
}
318329

0 commit comments

Comments
 (0)