Skip to content

Commit 5e6cfd7

Browse files
committed
Add D3D12_Workgroup_Zoo unit tests for workgroup query functions
WaveGetLaneCount() WaveGetLaneIndex() WaveIsFirstLane()
1 parent 88a9bde commit 5e6cfd7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

util/test/demos/d3d12/d3d12_subgroup_zoo.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ void main(uint3 inTid : SV_DispatchThreadID)
252252
data.x += WaveActiveSum(id);
253253
}
254254
}
255+
else if(IsTest(9))
256+
{
257+
// Query function : unit tests
258+
data.x = float(WaveGetLaneCount());
259+
data.y = float(WaveGetLaneIndex());
260+
data.z = float(WaveIsFirstLane());
261+
}
255262
SetOuput(data);
256263
}
257264

0 commit comments

Comments
 (0)