blob: b7c85fe10be7d0319d8704721f99041bcfc56d50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//TEST:SIMPLE(filecheck=CHECK): -entry computeMain -profile cs_5_0 -target hlsl
RWStructuredBuffer<uint> outputBuffer;
// CHECK: divide by zero
uint check<let b : bool>()
{
return 1 / int(b);
}
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
uint a = check<false>();
uint b = check<true>();
outputBuffer[tid] = a + b;
}
|