aco: fix assembly of MUBUF-to-LDS loads

These have an implicit m0 read and don't write VGPRs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333>
This commit is contained in:
Rhys Perry 2022-06-17 16:25:42 +01:00 committed by Marge Bot
parent 78779fd63d
commit 2f74df7117

View file

@ -416,9 +416,9 @@ emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* inst
encoding |= reg(ctx, instr->operands[2]) << 24;
encoding |= (mubuf.tfe ? 1 : 0) << 23;
encoding |= (reg(ctx, instr->operands[0]) >> 2) << 16;
if (instr->operands.size() > 3)
if (instr->operands.size() > 3 && !mubuf.lds)
encoding |= reg(ctx, instr->operands[3], 8) << 8;
else
else if (!mubuf.lds)
encoding |= reg(ctx, instr->definitions[0], 8) << 8;
encoding |= reg(ctx, instr->operands[1], 8);
out.push_back(encoding);