ir_validate: New pass for checking our invariants.

This commit is contained in:
Eric Anholt
2010-06-22 12:07:21 -07:00
committed by Ian Romanick
parent e46a454305
commit 53cdb7e51d
4 changed files with 199 additions and 0 deletions
+4
View File
@@ -148,6 +148,8 @@ compile_shader(struct glsl_shader *shader)
if (!state.error && !state.translation_unit.is_empty())
_mesa_ast_to_hir(&shader->ir, &state);
validate_ir_tree(&shader->ir);
/* Optimization passes */
if (!state.error && !shader->ir.is_empty()) {
bool progress;
@@ -166,6 +168,8 @@ compile_shader(struct glsl_shader *shader)
} while (progress);
}
validate_ir_tree(&shader->ir);
/* Print out the resulting IR */
if (!state.error && dump_lir) {
_mesa_print_ir(&shader->ir, &state);