aco/assembler: support ds_append/ds_*_addtid

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31075>
This commit is contained in:
Georg Lehmann 2024-09-08 11:26:52 +02:00 committed by Marge Bot
parent 2789cee0c0
commit 970503a0b9

View file

@ -502,12 +502,11 @@ emit_ds_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* i
encoding = 0;
if (!instr->definitions.empty())
encoding |= reg(ctx, instr->definitions[0], 8) << 24;
if (instr->operands.size() >= 3 && instr->operands[2].physReg() != m0)
encoding |= reg(ctx, instr->operands[2], 8) << 16;
if (instr->operands.size() >= 2 && instr->operands[1].physReg() != m0)
encoding |= reg(ctx, instr->operands[1], 8) << 8;
if (!instr->operands[0].isUndefined())
encoding |= reg(ctx, instr->operands[0], 8);
for (unsigned i = 0; i < MIN2(instr->operands.size(), 3); i++) {
Operand& op = instr->operands[i];
if (op.physReg() != m0 && !op.isUndefined())
encoding |= reg(ctx, op, 8) << (8 * i);
}
out.push_back(encoding);
}