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

Aras Pranckevicius aras at unity3d.com
Thu Sep 30 02:49:48 PDT 2010


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);
}


-- 
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100930/82461dd3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-crash-in-loop-analysis-when-some-of-loop-control.patch
Type: application/octet-stream
Size: 826 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100930/82461dd3/attachment.obj>


More information about the mesa-dev mailing list