[Mesa-dev] glsl: IR clone of ir_loop doesn't remap variable reference

Aras Pranckevicius aras at unity3d.com
Tue Dec 18 03:47:32 PST 2012


Something that hit me in GLSL Optimizer (which is based on Mesa's GLSL).
Cloning ir_loop just sets "counter" to the old counter. So in situations

1) loop controls are set,
2) and after that inlining happens, cloning the instructions including
original variable

It ends up in a situation where function body has one ir_variable object,
but a loop counter there points to another ir_variable (before it was

Not sure how/if that's relevant to Mesa though -- it might. I've fixed it
in my tree with this:

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/20121218/464e81d9/attachment-0001.html>

More information about the mesa-dev mailing list