Unroll more single iteration loops
Cyberpunk 2077 has a bunch of shaders with patterns like this:
loop {
if ssa_814 {
// ...
} else {
// ...
if ssa_835 {
// ...
} else {
break
}
}
// ...
break
}
It seems like we could do better. Whether adding if (is_breaking)
and removing the inner break
would be better is likely highly dependent on the situation.