| 1 |
RWByteAddressBuffer bar : register(u0); |
| 2 |
RWByteAddressBuffer foo : register(u1); |
| 3 |
|
| 4 |
void _main() |
| 5 |
{ |
| 6 |
[unroll] |
| 7 |
for (int i = 0; i < 16; i++) |
| 8 |
{ |
| 9 |
bar.Store4(i * 16 + 0, asuint(asfloat(foo.Load4(i * 16 + 0)))); |
| 10 |
} |
| 11 |
[loop] |
| 12 |
for (int i_1 = 0; i_1 < 16; i_1++) |
| 13 |
{ |
| 14 |
bar.Store4((15 - i_1) * 16 + 0, asuint(asfloat(foo.Load4(i_1 * 16 + 0)))); |
| 15 |
} |
| 16 |
float v = asfloat(bar.Load(160)); |
| 17 |
float w = asfloat(foo.Load(160)); |
| 18 |
[branch] |
| 19 |
if (v > 10.0f) |
| 20 |
{ |
| 21 |
foo.Store4(320, asuint(5.0f.xxxx)); |
| 22 |
} |
| 23 |
float value = 20.0f; |
| 24 |
[flatten] |
| 25 |
if (w > 40.0f) |
| 26 |
{ |
| 27 |
value = 20.0f; |
| 28 |
} |
| 29 |
foo.Store4(320, asuint(value.xxxx)); |
| 30 |
} |
| 31 |
|
| 32 |
void comp_main() |
| 33 |
{ |
| 34 |
_main(); |
| 35 |
} |
| 36 |
|
| 37 |
[numthreads(1, 1, 1)] |
| 38 |
void main() |
| 39 |
{ |
| 40 |
comp_main(); |
| 41 |
} |