From 46b8ba8154652ce73fba6c38dee057b4e50f6378 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 28 Mar 2024 14:33:50 +0000 Subject: [PATCH] aco: form hard clauses in VS prologs Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 5 ----- src/amd/compiler/aco_interface.cpp | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 54d4df710ca68..50489afd88a44 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -12076,11 +12076,6 @@ unsigned load_vb_descs(Builder& bld, PhysReg dest, Operand base, unsigned start, unsigned max) { unsigned count = MIN2((bld.program->dev.sgpr_limit - dest.reg()) / 4u, max); - - unsigned num_loads = (count / 4u) + util_bitcount(count & 0x3); - if (bld.program->gfx_level >= GFX10 && num_loads > 1) - bld.sopp(aco_opcode::s_clause, num_loads - 1); - for (unsigned i = 0; i < count;) { unsigned size = 1u << util_logbase2(MIN2(count - i, 4)); diff --git a/src/amd/compiler/aco_interface.cpp b/src/amd/compiler/aco_interface.cpp index 8b8029db55da8..a1d747c71f6c7 100644 --- a/src/amd/compiler/aco_interface.cpp +++ b/src/amd/compiler/aco_interface.cpp @@ -357,6 +357,8 @@ aco_compile_vs_prolog(const struct aco_compiler_options* options, select_vs_prolog(program.get(), pinfo, &config, options, info, args); validate(program.get()); insert_NOPs(program.get()); + if (program->gfx_level >= GFX10) + form_hard_clauses(program.get()); if (options->dump_shader) aco_print_program(program.get(), stderr);