&gt; &gt; This patch fixes a bug in ir_hirearchical_visitor: when traversing<br>&gt; &gt; an exec_list representing the formal or actual parameters of a<br>&gt; &gt; function, it modified base_ir to point to each parameter in turn,<br>
&gt; &gt; rather than leaving it as a pointer to the enclosing statement.<br>&gt; &gt; This was a problem, since base_ir is used by visitor classes to<br>&gt; &gt; locate the statement containing the node being visited (usually so<br>
&gt; &gt; that additional statements can be inserted before or after it).<br>&gt; &gt; Without this fix, visitors might attempt to insert statements into<br>&gt; &gt; parameter lists.<br>&gt;<br>&gt; This sure sounds like a bug, but I&#39;m really surprised that this hasn&#39;t<br>
&gt; cause catastrophic failures before.  Do you have a shader in mind that<br>&gt; fails due to this issue?<br><br>This very behavior was causing crashes in do_vec_index_to_cond_assign with an older version of Mesa (before commit 2f4fe151681a6f6afe) that I wrote about in &quot;glsl: do_vec_index_to_cond_assign not called; has problems if called&quot; thread on August 17th. After that commit do_vec_index_to_cond_assign was moved into drivers themselves, where the IR is probably &quot;low level&quot; enough that it does not cause problems.<div>
<br><div><br>--<br>Aras Pranckevičius<br>work: <a href="http://unity3d.com">http://unity3d.com</a><br>home: <a href="http://aras-p.info">http://aras-p.info</a>
</div></div><div><br></div>