On 08/03/2011 05:07 PM, Paul Berry wrote:
> At least one of the invariants verified by IR validation concerns the
> relative ordering of toplevel constructs in the IR: references to
> global variables must come after the declarations of those global
> variables.
> 
> Since linking affects the ordering of toplevel constructs in the IR,
> it's possible that a bug in the linker will cause invalid IR to be
> generated, even if all the pre-linked shaders are valid.  (In fact,
> such a bug currently exists.  I'll submit a follow-up patch which
> fixes it.)
> 
> Bugs like this are easily masked by further optimization passes,
> particularly inlining.  So to make them easier to track down, this
> patch addes an IR validation step right after linking, and before
> final optimization occurs.  The validation only occurs on debug
> builds.

Really surprised to see that we weren't doing this.  It absolutely
should happen.  Though, I agree with Eric...reorder them so this becomes
patch #2.

Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to