[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


Hi,

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
like:

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
cloned).

Not sure how/if that's relevant to Mesa though -- it might. I've fixed it
in my tree with this:
https://github.com/aras-p/glsl-optimizer/commit/c2919f69#diff-0


-- 
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