[Mesa-dev] [PATCH] glsl: fix crash in loop analysis when some loop controls can't be found

Eric Anholt eric at anholt.net
Thu Nov 11 15:09:06 PST 2010


On Thu, 30 Sep 2010 12:49:48 +0300, Aras Pranckevicius <aras at unity3d.com> wrote:
> Attached patch fixes crash in GLSL loop analysis when some of the loop's
> controls (e.g. "from") can not be determined.
> 
> This happens on a shader like this (there's another loop between counter
> initialization & loop):
> 
> void main() {
> float a = 0.0;
> int k = 0;
> for (int i = 0; i < 3; ++i)
> a += 1.0;
> for ( ; k < 3; ++k)
> a += 3.0;
>     gl_FragColor = vec4(a);
> }

Turned this into a piglit test loop-07.frag, and applied the Mesa
patch.  Thanks!

By the way, are you interested in becoming a Mesa and piglit committer?
You've been turning out some good testcases and fixes, and then we
wouldn't lose your patches :)

http://www.freedesktop.org/wiki/AccountRequests
-------------- 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/20101111/80124902/attachment.pgp>


More information about the mesa-dev mailing list