blob: 9588e5e63b9cd89839e33085ed5a9e6a9fe18a31 [file] [log] [blame]
RWByteAddressBuffer b : register(u0);
uint tint_mod_u32(uint lhs, uint rhs) {
uint v = (((rhs == 0u)) ? (1u) : (rhs));
return (lhs - ((lhs / v) * v));
}
[numthreads(1, 1, 1)]
void main() {
uint i = 0u;
{
while(true) {
if ((i >= b.Load(0u))) {
break;
}
uint v_1 = (min(i, 49u) * 4u);
if ((tint_mod_u32(i, 2u) == 0u)) {
{
b.Store((4u + v_1), (b.Load((4u + v_1)) * 2u));
i = (i + 1u);
}
continue;
}
b.Store((4u + v_1), 0u);
{
b.Store((4u + v_1), (b.Load((4u + v_1)) * 2u));
i = (i + 1u);
}
continue;
}
}
}