[Mesa-dev] [PATCH 2/2] i965: Don't validate IR trees on non-debug builds.

Eric Anholt eric at anholt.net
Fri Mar 15 12:04:06 PDT 2013


This was taking 1.3% of CPU on TF2's load time.
---
 src/mesa/drivers/dri/i965/brw_shader.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index e4392bd..59e68d8 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -232,7 +232,9 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
 	 }
       }
 
+#ifdef DEBUG
       validate_ir_tree(shader->ir);
+#endif
 
       reparent_ir(shader->ir, shader->ir);
       ralloc_free(mem_ctx);
-- 
1.7.10.4



More information about the mesa-dev mailing list