* should probably be the parser context, but there isn't one yet.
*/
const char *source = shader->Source;
- state.error = preprocess(shader, &source);
+ state.error = preprocess(shader, &source, &state.info_log);
if (!state.error) {
_mesa_glsl_lexer_ctor(& state, source);
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;
} while (progress);
}
+ validate_ir_tree(&shader->ir);
+
/* Print out the resulting IR */
if (!state.error && dump_lir) {
_mesa_print_ir(&shader->ir, &state);