blob: 1526244a267bfc10ba886db2c731a8b6ffe4942e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//TEST:COMPARE_HLSL:-no-mangle -profile cs_5_0 -target dxbc-assembly
// Check output for `[allow_uav_conditional]`
RWStructuredBuffer<uint> gBuffer : register(u0);
[numthreads(16,1,1)]
void main(
uint tid : SV_DispatchThreadID)
{
uint index = tid;
[allow_uav_condition]
for(;;)
{
if(gBuffer[index] == 0)
break;
index = gBuffer[index];
gBuffer[index]--;
}
}
|