Skip to content

Commit cf6e3d6

Browse files
committed
Add D3D12_Workgroup_Zoo unit tests for Wave Scan and Prefix ops
WavePrefixCountBits() WavePrefixSum() WavePrefixProduct()
1 parent a4d916f commit cf6e3d6

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
@@ -308,6 +308,17 @@ void main(uint3 inTid : SV_DispatchThreadID)
308308
data.w = WaveReadLaneAt(data.x, 2+id%3);
309309
}
310310
}
311+
else if(IsTest(12))
312+
{
313+
// Scan and Prefix functions : unit tests
314+
if (id >= 2 && id <= 20)
315+
{
316+
data.x = WavePrefixCountBits(id > 4);
317+
data.y = WavePrefixCountBits(id > 10);
318+
data.z = WavePrefixSum(data.x);
319+
data.w = WavePrefixProduct(1 + data.y);
320+
}
321+
}
311322
SetOuput(data);
312323
}
313324

0 commit comments

Comments
 (0)