glsl: Don't increase the iteration count when there are no terminators
Incrementing the iteration count was intended to fix an off-by-one error when the first terminator was superseded by a later terminator. If there is no first terminator or later terminator, there is no off-by-one error. Incrementing the loop count creates one. This can be seen in loops like:
do {
if (something) {
// No breaks or continues here.
}
} while (false);
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110953
Fixes: 646621c6 ("glsl: make loop unrolling more like the nir unrolling path")
Cc: Timothy Arceri tarceri@itsqueeze.com @tarceri
Edited by Ian Romanick