diff options
Diffstat (limited to 'tests/hlsl/simple')
| -rw-r--r-- | tests/hlsl/simple/allow-uav-conditional.hlsl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/hlsl/simple/allow-uav-conditional.hlsl b/tests/hlsl/simple/allow-uav-conditional.hlsl new file mode 100644 index 000000000..3da239860 --- /dev/null +++ b/tests/hlsl/simple/allow-uav-conditional.hlsl @@ -0,0 +1,19 @@ +//TEST:COMPARE_HLSL: -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] + while(gBuffer[index] != 0) + { + index = gBuffer[index]; + gBuffer[index]--; + } +} |
