> > This patch fixes a bug in ir_hirearchical_visitor: when traversing<br>> > an exec_list representing the formal or actual parameters of a<br>> > function, it modified base_ir to point to each parameter in turn,<br>
> > rather than leaving it as a pointer to the enclosing statement.<br>> > This was a problem, since base_ir is used by visitor classes to<br>> > locate the statement containing the node being visited (usually so<br>
> > that additional statements can be inserted before or after it).<br>> > Without this fix, visitors might attempt to insert statements into<br>> > parameter lists.<br>><br>> This sure sounds like a bug, but I'm really surprised that this hasn't<br>
> cause catastrophic failures before. Do you have a shader in mind that<br>> 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 "glsl: do_vec_index_to_cond_assign not called; has problems if called" thread on August 17th. After that commit do_vec_index_to_cond_assign was moved into drivers themselves, where the IR is probably "low level" 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>