aco: form hard clauses in VS prologs

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29071>
This commit is contained in:
Rhys Perry 2024-03-28 14:33:50 +00:00 committed by Marge Bot
parent d48c8905f1
commit 46b8ba8154
2 changed files with 2 additions and 5 deletions

View File

@ -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));

View File

@ -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);