[Mesa-dev] [PATCH 0/6] glsl: Add support for switch statements

Eric Anholt eric at anholt.net
Sun Jun 19 14:21:24 PDT 2011


On Sat, 18 Jun 2011 09:29:32 +0200, Keith Packard <keithp at keithp.com> wrote:
> On Fri, 17 Jun 2011 17:43:14 -0700, Dan McCabe <zen3d.linux at gmail.com> wrote:
> 
> >     		break; // implicit exit from loop at end of switch
> >     	} while (true);
> 
> Seems like this could just be
> 
>         } while (false);
> 
> as I don't see any way the loop could go around more than once.

"while (true)" is the instruction available in the hardware, this isn't
a description of C code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110619/661078e8/attachment.pgp>


More information about the mesa-dev mailing list