[Mesa-dev] r600/sb loop issue

Matt Turner mattst88 at gmail.com
Fri Dec 5 20:50:14 PST 2014


On Fri, Dec 5, 2014 at 8:13 PM, Vadim Girlin <vadimgirlin at gmail.com> wrote:
> I suspect we should rather get rid of such loops somehow, i.e. convert to
> something else, the loop that never repeats is not really a loop anyway.
> AFAICS "continue" is not supported in switch statements according to GLSL
> specs, so the loops generated for switch will never be repeated. Am I
> missing something? Even if repeating is possible somehow, at least we can
> get rid of the loops that are not repeated.

I don't think that's true. I don't see anything in the spec that would
lead me to believe continue cannot occur in a switch statement.

In fact, we have some relatively complicated shaders that have a
continue in a switch. See
tests/shaders/glsl-fs-continue-in-switch-in-do-while.shader_test


More information about the mesa-dev mailing list