Skip to content

Commit 214d3f7

Browse files
committed
Add D3D12_Workgroup_Zoo unit tests for subgroup Broadcast ops
WaveReadLaneFirst() WaveReadLaneAt()
1 parent b8f1d01 commit 214d3f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

util/test/demos/d3d12/d3d12_subgroup_zoo.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,17 @@ void main(uint3 inTid : SV_DispatchThreadID)
297297
data.w = countbits(ballot.x) + countbits(ballot.y) + countbits(ballot.z) + countbits(ballot.w);
298298
}
299299
}
300+
else if(IsTest(11))
301+
{
302+
// Broadcast functions : unit tests
303+
if (id >= 2 && id <= 20)
304+
{
305+
data.x = WaveReadLaneFirst(id);
306+
data.y = WaveReadLaneAt(id, 5);
307+
data.z = WaveReadLaneAt(id, id);
308+
data.w = WaveReadLaneAt(data.x, 2+id%3);
309+
}
310+
}
300311
SetOuput(data);
301312
}
302313

0 commit comments

Comments
 (0)