[Piglit] [PATCH] glsl-1.30: add test for default in switch not after all case statements

Eric Anholt eric at anholt.net
Fri Apr 12 15:51:59 PDT 2013


sroland at vmware.com writes:

> From: Roland Scheidegger <sroland at vmware.com>
>
> By the looks of it "default" is not required to appear as last statement
> in a switch expression, and c rules should be followed (which is probably
> a mess to implement thanks to fallthrough).
> Seems to fail with mesa glsl compiler (at least with tgsi translation).

Reviewed-by: Eric Anholt <eric at anholt.net>

I'm sure it does fail with the compiler as-is.  Without too much
restructuring (which the code desperately needs -- see
fs-exec-after-break, which I think is a killer), I think you'd have to
note where the default case check is, and have later cases patch the
condition for it to include "but not in this case".

What a mess.
-------------- 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/piglit/attachments/20130412/c6d73a75/attachment.pgp>


More information about the Piglit mailing list