mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 11:30:11 +01:00
nir/validate: Only build in debug mode
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
347ab2bf24
commit
dcb1acdea0
2 changed files with 11 additions and 0 deletions
|
|
@ -1437,7 +1437,11 @@ void nir_index_blocks(nir_function_impl *impl);
|
|||
|
||||
void nir_print_shader(nir_shader *shader, FILE *fp);
|
||||
|
||||
#ifdef DEBUG
|
||||
void nir_validate_shader(nir_shader *shader);
|
||||
#else
|
||||
static inline void nir_validate_shader(nir_shader *shader) { }
|
||||
#endif /* DEBUG */
|
||||
|
||||
void nir_calc_dominance_impl(nir_function_impl *impl);
|
||||
void nir_calc_dominance(nir_shader *shader);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue