[Mesa-dev] [PATCH 1/2] glsl hierarchical visitor: Do not overwrite base_ir for parameter lists.

Paul Berry stereotype441 at gmail.com
Mon Sep 19 13:44:02 PDT 2011

On 19 September 2011 10:59, Ian Romanick <idr at freedesktop.org> wrote:

> Hash: SHA1
> On 09/15/2011 04:40 PM, Paul Berry wrote:
> > 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?

No, but if this bug isn't fixed, then the patch that follows in this patch
series ("glsl: Implement a lowering pass for gl_ClipDistance.") fails pretty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110919/17b61b56/attachment.htm>

More information about the mesa-dev mailing list