From: Rhys Perry Date: Fri, 31 Jan 2020 12:40:51 +0000 (+0000) Subject: aco: set has_divergent_branch for discards in loops X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1a2e1df7882e9d3816f28d6a0827d4ac66ac8f6;p=mesa.git aco: set has_divergent_branch for discards in loops Signed-off-by: Rhys Perry CC: Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 29d40d18b25..7b429f69350 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -4462,6 +4462,9 @@ void visit_discard(isel_context* ctx, nir_intrinsic_instr *instr) ctx->block->kind |= block_kind_break; unsigned idx = ctx->block->index; + ctx->cf_info.parent_loop.has_divergent_branch = true; + ctx->cf_info.nir_to_aco[instr->instr.block->index] = idx; + /* remove critical edges from linear CFG */ bld.branch(aco_opcode::p_branch); Block* break_block = ctx->program->create_and_insert_block();