From: Rhys Perry Date: Wed, 27 Nov 2019 17:06:10 +0000 (+0000) Subject: aco: fix assembly of FLAT/GLOBAL atomics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=082e3a68fada731757ee06d1afdfa2cf654a0ad9;p=mesa.git aco: fix assembly of FLAT/GLOBAL atomics They can take both a definition and data operand Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann --- diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 4b70b2c0ac7..c9b5ca10684 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -425,7 +425,7 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* encoding = (0xFF & instr->operands[0].physReg()); if (!instr->definitions.empty()) encoding |= (0xFF & instr->definitions[0].physReg()) << 24; - else + if (instr->operands.size() >= 3) encoding |= (0xFF & instr->operands[2].physReg()) << 8; if (!instr->operands[1].isUndefined()) { assert(ctx.chip_class >= GFX10 || instr->operands[1].physReg() != 0x7F);