aco/assembler: Don't emit target basic block index when chaining branches

This could erroneously cause an assertion to fail if the
target block index was larger than UINT16_MAX.

Fixes: cab5639a09 ('aco/assembler: chain branches instead of emitting long jumps')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32599>
This commit is contained in:
Daniel Schürmann 2024-12-11 14:28:46 +01:00 committed by Marge Bot
parent 445ff2e500
commit 22881712c8

View file

@ -1617,7 +1617,7 @@ chain_branches(asm_context& ctx, std::vector<uint32_t>& out, branch_info& branch
}
const unsigned block_offset = insert_at + code.size();
branch_instr = bld.sopp(aco_opcode::s_branch, target);
branch_instr = bld.sopp(aco_opcode::s_branch, 0);
emit_sopp_instruction(ctx, code, branch_instr, true);
insert_code(ctx, out, insert_at, code.size(), code.data());