2018-06-25 08:33:13 +00:00
|
|
|
RWByteAddressBuffer bar : register(u0);
|
|
|
|
RWByteAddressBuffer foo : register(u1);
|
|
|
|
|
|
|
|
void comp_main()
|
|
|
|
{
|
|
|
|
[unroll]
|
2020-05-20 14:27:49 +00:00
|
|
|
for (int _136 = 0; _136 < 16; )
|
2018-06-25 08:33:13 +00:00
|
|
|
{
|
2020-05-20 14:27:49 +00:00
|
|
|
bar.Store4(_136 * 16 + 0, asuint(asfloat(foo.Load4(_136 * 16 + 0))));
|
|
|
|
_136++;
|
2018-06-25 08:33:13 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
[loop]
|
2020-05-20 14:27:49 +00:00
|
|
|
for (int _137 = 0; _137 < 16; )
|
2018-06-25 08:33:13 +00:00
|
|
|
{
|
2020-05-20 14:27:49 +00:00
|
|
|
bar.Store4((15 - _137) * 16 + 0, asuint(asfloat(foo.Load4(_137 * 16 + 0))));
|
|
|
|
_137++;
|
2018-06-25 08:33:13 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
[branch]
|
|
|
|
if (asfloat(bar.Load(160)) > 10.0f)
|
|
|
|
{
|
|
|
|
foo.Store4(320, asuint(5.0f.xxxx));
|
|
|
|
}
|
|
|
|
foo.Store4(320, asuint(20.0f.xxxx));
|
|
|
|
}
|
|
|
|
|
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
comp_main();
|
|
|
|
}
|