diff --git a/src/intel/compiler/brw_validate.cpp b/src/intel/compiler/brw_validate.cpp index 1ec66e42349..4550403fb98 100644 --- a/src/intel/compiler/brw_validate.cpp +++ b/src/intel/compiler/brw_validate.cpp @@ -291,12 +291,11 @@ brw_validate(const brw_shader &s) { const intel_device_info *devinfo = s.devinfo; - if (s.cfg) - s.cfg->validate(_mesa_shader_stage_to_abbrev(s.stage)); - - if (s.phase <= BRW_SHADER_PHASE_AFTER_NIR) + if (!s.cfg) return; + s.cfg->validate(_mesa_shader_stage_to_abbrev(s.stage)); + foreach_block(block, s.cfg) { /* Track the last used address register. Usage of the address register * in the IR should be limited to within a block, otherwise we would