Mesa (glsl2): glsl2: Don't validate IR if there were compilation errors

Ian Romanick idr at kemper.freedesktop.org
Tue Jul 20 18:43:28 UTC 2010


Module: Mesa
Branch: glsl2
Commit: 5a2e0b8ce59a3d9f8fa7510546137aff40016c74
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a2e0b8ce59a3d9f8fa7510546137aff40016c74

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Jul 20 11:37:45 2010 -0700

glsl2: Don't validate IR if there were compilation errors

---

 src/glsl/main.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index e27d9c1..3ae0eeb 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -172,10 +172,9 @@ compile_shader(struct gl_shader *shader)
    if (!state->error && !state->translation_unit.is_empty())
       _mesa_ast_to_hir(shader->ir, state);
 
-   validate_ir_tree(shader->ir);
-
    /* Print out the unoptimized IR. */
    if (!state->error && dump_hir) {
+      validate_ir_tree(shader->ir);
       _mesa_print_ir(shader->ir, state);
    }
 
@@ -196,9 +195,10 @@ compile_shader(struct gl_shader *shader)
 	 progress = do_vec_index_to_cond_assign(shader->ir) || progress;
 	 progress = do_swizzle_swizzle(shader->ir) || progress;
       } while (progress);
+
+      validate_ir_tree(shader->ir);
    }
 
-   validate_ir_tree(shader->ir);
 
    /* Print out the resulting IR */
    if (!state->error && dump_lir) {




More information about the mesa-commit mailing list