diff --git a/src/intel/compiler/brw_fs.h b/src/intel/compiler/brw_fs.h index 7239f42585f..778853fa0cf 100644 --- a/src/intel/compiler/brw_fs.h +++ b/src/intel/compiler/brw_fs.h @@ -256,7 +256,13 @@ public: unsigned *out_pull_index); bool lower_constant_loads(); virtual void invalidate_analysis(brw::analysis_dependency_class c); + +#ifndef NDEBUG void validate(); +#else + void validate() {} +#endif + bool opt_algebraic(); bool opt_redundant_halt(); bool opt_cse(); diff --git a/src/intel/compiler/brw_fs_validate.cpp b/src/intel/compiler/brw_fs_validate.cpp index 35cf4399984..c285cc2dc26 100644 --- a/src/intel/compiler/brw_fs_validate.cpp +++ b/src/intel/compiler/brw_fs_validate.cpp @@ -86,10 +86,10 @@ } \ } +#ifndef NDEBUG void fs_visitor::validate() { -#ifndef NDEBUG foreach_block_and_inst (block, fs_inst, inst, cfg) { switch (inst->opcode) { case SHADER_OPCODE_SEND: @@ -193,5 +193,5 @@ fs_visitor::validate() fsv_assert_eq(inst->dst.stride, 1); } } -#endif } +#endif