mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
aco: set exec_potentially_empty for demotes
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa78 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
This commit is contained in:
parent
21eafe30df
commit
8f291dc146
1 changed files with 6 additions and 0 deletions
|
|
@ -6195,6 +6195,9 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr)
|
|||
}
|
||||
case nir_intrinsic_demote:
|
||||
bld.pseudo(aco_opcode::p_demote_to_helper);
|
||||
|
||||
if (ctx->cf_info.loop_nest_depth || ctx->cf_info.parent_if.is_divergent)
|
||||
ctx->cf_info.exec_potentially_empty = true;
|
||||
ctx->block->kind |= block_kind_uses_demote;
|
||||
ctx->program->needs_exact = true;
|
||||
break;
|
||||
|
|
@ -6203,6 +6206,9 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr)
|
|||
assert(src.regClass() == bld.lm);
|
||||
Temp cond = bld.sop2(Builder::s_and, bld.def(bld.lm), bld.def(s1, scc), src, Operand(exec, bld.lm));
|
||||
bld.pseudo(aco_opcode::p_demote_to_helper, cond);
|
||||
|
||||
if (ctx->cf_info.loop_nest_depth || ctx->cf_info.parent_if.is_divergent)
|
||||
ctx->cf_info.exec_potentially_empty = true;
|
||||
ctx->block->kind |= block_kind_uses_demote;
|
||||
ctx->program->needs_exact = true;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue