Skip to content
Snippets Groups Projects
Commit f5988189 authored by Ian Romanick's avatar Ian Romanick Committed by Juan A. Suárez
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")
(cherry picked from commit ee1c69fa)
parent 9171d2f1
No related branches found
No related tags found
No related merge requests found
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