diff options
author | Paul Berry <[email protected]> | 2011-08-03 15:37:01 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-08-08 12:44:02 -0700 |
commit | c148ef6ddb3dbf256c26d82ed2f45f1fde55a231 (patch) | |
tree | 09766d23e8abbe5c5469b35ff97ed1885c1d5856 /src/glsl/ir_print_visitor.cpp | |
parent | 01a851c296347d8e9d2166b3c83eab97404c0670 (diff) |
glsl: validate IR after linking (debug builds only)
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 was fixed by the previous commit.)
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.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
0 files changed, 0 insertions, 0 deletions