From: Samuel Pitoiset Date: Fri, 8 May 2020 16:02:12 +0000 (+0200) Subject: aco: fix off-by-one error with 16-bit MTBUF opcodes on GFX10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc1a1da8abbc88e17fc6dec8d000436898187971;p=mesa.git aco: fix off-by-one error with 16-bit MTBUF opcodes on GFX10 Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index bac91c899e7..8876b5bc8f8 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -408,7 +408,7 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* encoding |= (0xFF & instr->operands[1].physReg()); if (ctx.chip_class >= GFX10) { - encoding |= (((opcode & 0x08) >> 4) << 21); /* MSB of 4-bit OPCODE */ + encoding |= (((opcode & 0x08) >> 3) << 21); /* MSB of 4-bit OPCODE */ } out.push_back(encoding);