aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_validate.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-06 16:11:57 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:20:24 -0800
commitdcb1acdea00a8f2c29777ff4078832df9d5b40ce (patch)
treedec95ee541856f5d05cb0e874c9ee94abeb830a9 /src/glsl/nir/nir_validate.c
parent347ab2bf245e67f72bc707b69f92c5a5dd0c49b4 (diff)
nir/validate: Only build in debug mode
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_validate.c')
-rw-r--r--src/glsl/nir/nir_validate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c
index 240da02a715..d2ce021196e 100644
--- a/src/glsl/nir/nir_validate.c
+++ b/src/glsl/nir/nir_validate.c
@@ -32,6 +32,11 @@
* This file checks for invalid IR indicating a bug somewhere in the compiler.
*/
+/* Since this file is just a pile of asserts, don't bother compiling it if
+ * we're not building a debug build.
+ */
+#ifdef DEBUG
+
/*
* Per-register validation state.
*/
@@ -882,3 +887,5 @@ nir_validate_shader(nir_shader *shader)
destroy_validate_state(&state);
}
+
+#endif /* NDEBUG */