Skip to content
Snippets Groups Projects
Commit ee1c69fa authored by Ian Romanick's avatar Ian Romanick
Browse files

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);

Reviewed-by: default avatarTimothy Arceri <tarceri@itsqueeze.com>
Tested-by: default avatarAbel Briggs <abelbriggs1@hotmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110953
Fixes: 646621c6 ("glsl: make loop unrolling more like the nir unrolling path")
parent 5c4289dd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment