On 03/15/2013 12:04 PM, Eric Anholt wrote:
This was taking 5% of CPU on TF2's load time.
Crap... I thought we already only did this in debug mode. The series is Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>
--- src/mesa/program/ir_to_mesa.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 2cb5f02..ae9c0cd 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3114,7 +3114,9 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader) _mesa_ast_to_hir(shader->ir, state); if (!state->error && !shader->ir->is_empty()) { +#ifdef DEBUG validate_ir_tree(shader->ir); +#endif /* Do some optimization at compile time to reduce shader IR size * and reduce later work if the same shader is linked multiple times @@ -3122,7 +3124,9 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader) while (do_common_optimization(shader->ir, false, false, 32)) ; +#ifdef DEBUG validate_ir_tree(shader->ir); +#endif } shader->symbols = state->symbols;
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev