[Mesa-dev] [PATCH 1/2] glsl hierarchical visitor: Do not overwrite base_ir for parameter lists.
aras at unity3d.com
Mon Sep 19 11:06:47 PDT 2011
> > This patch fixes a bug in ir_hirearchical_visitor: when traversing
> > an exec_list representing the formal or actual parameters of a
> > function, it modified base_ir to point to each parameter in turn,
> > rather than leaving it as a pointer to the enclosing statement.
> > This was a problem, since base_ir is used by visitor classes to
> > locate the statement containing the node being visited (usually so
> > that additional statements can be inserted before or after it).
> > Without this fix, visitors might attempt to insert statements into
> > parameter lists.
> This sure sounds like a bug, but I'm really surprised that this hasn't
> cause catastrophic failures before. Do you have a shader in mind that
> fails due to this issue?
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev