summaryrefslogtreecommitdiff
path: root/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-03-18 08:42:19 -0700
committerEric Anholt <eric@anholt.net>2013-03-25 08:50:38 -0700
commit712bac1f4130cb2ea75c53698cc6428d93b26ed3 (patch)
tree9eb808d161b9b57cb08f56f9ea11511c1f0b0aa1 /src/glsl/ir_validate.cpp
parent92b8a37fdfff9e83f39b8885f51ed2f60326ab6a (diff)
mesa: Disable validate_ir_tree() on release builds.
Since half of ir_validate uses asserts() (the other using printf() then abort()), there's not much use to calling it in a release build. Cuts 6.3% of the startup time of TF2. NOTE: This is a candidate for the stable branches. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r--src/glsl/ir_validate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 24ea506dca3..699c192cd2c 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -701,6 +701,11 @@ check_node_type(ir_instruction *ir, void *data)
void
validate_ir_tree(exec_list *instructions)
{
+ /* We shouldn't have any reason to validate IR in a release build,
+ * and it's half composed of assert()s anyway which wouldn't do
+ * anything.
+ */
+#ifdef DEBUG
ir_validate v;
v.run(instructions);
@@ -710,4 +715,5 @@ validate_ir_tree(exec_list *instructions)
visit_tree(ir, check_node_type, NULL);
}
+#endif
}