On Mon, Feb 22, 2016 at 11:42 AM, Ian Romanick <[email protected]> wrote:
> From: Ian Romanick <[email protected]>
>
> Previously loops like
>
>    do {
>       // ...
>    } while (false);
>
> that did not have any other loop-branch instructions would not be
> unrolled.  This is commonly used to wrap multiline preprocessor macros.
>
> This produces IR like
>
>     (loop (
>        ...
>        break
>     ))
>
> Since limiting_terminator was NULL, the loop unroller would
> throw up its hands and say, "I don't know how many iterations.  How
> can I unroll this?"
>
> We can detect this another way.  If there is no limiting_terminator
> and the only loop-branch is a break as the last IR, there's only one
> iteration.
>
> On my very old checkout of shader-db, this removes a loop from Orbital
> Explorer, but it does not otherwise affect the shader.  The loop removed
> is the one the compiler inserts surrounding the switch statement.

Orbital Explorer has a dead while loop because of

commit 73dd50acf6d244979c2a657906aa56d3ac60d550
Author: Tapani Pälli <[email protected]>
Date:   Wed Aug 6 09:46:54 2014 +0300

    glsl: implement switch flow control using a loop

I don't understand how this patch interacts with that nor why it
doesn't break Orbital Explorer rendering (I checked).

The Orbital Explorer shader *does* have other loop-branch
instructions, so it seems like this patch shouldn't have affected it?
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to