diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 87dd28f23cc..3420028cb60 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -7960,13 +7960,10 @@ fs_visitor::fixup_3src_null_dest() static const fs_inst * find_halt_control_flow_region_start(const fs_visitor *v) { - if (v->stage == MESA_SHADER_FRAGMENT && - brw_wm_prog_data(v->prog_data)->uses_kill) { - foreach_block_and_inst(block, fs_inst, inst, v->cfg) { - if (inst->opcode == BRW_OPCODE_HALT || - inst->opcode == SHADER_OPCODE_HALT_TARGET) - return inst; - } + foreach_block_and_inst(block, fs_inst, inst, v->cfg) { + if (inst->opcode == BRW_OPCODE_HALT || + inst->opcode == SHADER_OPCODE_HALT_TARGET) + return inst; } return NULL; @@ -8539,9 +8536,6 @@ fs_visitor::run_fs(bool allow_spilling, bool do_rep_send) if (failed) return false; - if (wm_prog_data->uses_kill) - bld.emit(SHADER_OPCODE_HALT_TARGET); - if (wm_key->alpha_test_func) emit_alpha_test(); diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 2de1a4c9acb..108d778cae9 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -46,6 +46,8 @@ fs_visitor::emit_nir_code() last_scratch = ALIGN(nir->scratch_size, 4) * dispatch_width; nir_emit_impl(nir_shader_get_entrypoint((nir_shader *)nir)); + + bld.emit(SHADER_OPCODE_HALT_TARGET); } void