aco: remove fast path in insert_exec_mask's process_instructions

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25038>
This commit is contained in:
Rhys Perry 2022-09-08 18:05:59 +01:00 committed by Marge Bot
parent 0e8192a76b
commit 41b6020ff3
4 changed files with 2 additions and 20 deletions

View file

@ -537,19 +537,6 @@ process_instructions(exec_ctx& ctx, Block* block, std::vector<aco_ptr<Instructio
state = Exact;
}
/* if the block doesn't need both, WQM and Exact, we can skip processing the instructions */
bool process = (ctx.handle_wqm && (ctx.info[block->index].block_needs & state) !=
(ctx.info[block->index].block_needs & (WQM | Exact))) ||
block->kind & block_kind_uses_discard || block->kind & block_kind_needs_lowering;
if (!process) {
std::vector<aco_ptr<Instruction>>::iterator it = std::next(block->instructions.begin(), idx);
instructions.insert(instructions.end(),
std::move_iterator<std::vector<aco_ptr<Instruction>>::iterator>(it),
std::move_iterator<std::vector<aco_ptr<Instruction>>::iterator>(
block->instructions.end()));
return;
}
Builder bld(ctx.program, &instructions);
for (; idx < block->instructions.size(); idx++) {

View file

@ -8712,7 +8712,6 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
* Otherwise, these two behave the same. */
Temp dst = get_ssa_temp(ctx, &instr->def);
bld.pseudo(aco_opcode::p_is_helper, Definition(dst), Operand(exec, bld.lm));
ctx->block->kind |= block_kind_needs_lowering;
ctx->program->needs_exact = true;
break;
}
@ -8778,7 +8777,6 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
*/
Temp elected = bld.pseudo(aco_opcode::p_elect, bld.def(bld.lm), Operand(exec, bld.lm));
emit_wqm(bld, elected, get_ssa_temp(ctx, &instr->def));
ctx->block->kind |= block_kind_needs_lowering;
break;
}
case nir_intrinsic_shader_clock: {

View file

@ -1885,9 +1885,8 @@ enum block_kind {
block_kind_invert = 1 << 10,
block_kind_discard_early_exit = 1 << 11,
block_kind_uses_discard = 1 << 12,
block_kind_needs_lowering = 1 << 13,
block_kind_resume = 1 << 14,
block_kind_export_end = 1 << 15,
block_kind_resume = 1 << 13,
block_kind_export_end = 1 << 14,
};
struct RegisterDemand {

View file

@ -851,8 +851,6 @@ print_block_kind(uint16_t kind, FILE* output)
fprintf(output, "invert, ");
if (kind & block_kind_uses_discard)
fprintf(output, "discard, ");
if (kind & block_kind_needs_lowering)
fprintf(output, "needs_lowering, ");
if (kind & block_kind_export_end)
fprintf(output, "export_end, ");
}