2021-06-02 21:02:34 +00:00
|
|
|
RWByteAddressBuffer b : register(u0, space0);
|
2021-05-21 21:01:23 +00:00
|
|
|
|
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void main() {
|
|
|
|
uint i = 0u;
|
2021-11-25 18:44:50 +00:00
|
|
|
[loop] while (true) {
|
2021-05-21 21:01:23 +00:00
|
|
|
if ((i >= b.Load(0u))) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
const uint p_save = i;
|
|
|
|
if (((i % 2u) == 0u)) {
|
|
|
|
{
|
|
|
|
b.Store((4u + (4u * p_save)), asuint((b.Load((4u + (4u * p_save))) * 2u)));
|
|
|
|
i = (i + 1u);
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
b.Store((4u + (4u * p_save)), asuint(0u));
|
|
|
|
{
|
|
|
|
b.Store((4u + (4u * p_save)), asuint((b.Load((4u + (4u * p_save))) * 2u)));
|
|
|
|
i = (i + 1u);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|