From: Rhys Perry Date: Thu, 12 Sep 2019 18:55:12 +0000 (+0100) Subject: aco: Assemble opsel in VOP3 instructions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c24cd975159b7053aaf51ca3b684f23890a6b07e;p=mesa.git aco: Assemble opsel in VOP3 instructions. Signed-off-by: Rhys Perry Reviewed-By: Timur Kristóf Reviewed-by: Daniel Schürmann --- diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 272be088589..34eb9fb730f 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -475,7 +475,6 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* opcode = opcode + 0x270; } - // TODO: op_sel uint32_t encoding; if (ctx.chip_class <= GFX9) { encoding = (0b110100 << 26); @@ -487,6 +486,8 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* encoding |= (vop3->clamp ? 1 : 0) << 15; for (unsigned i = 0; i < 3; i++) encoding |= vop3->abs[i] << (8+i); + for (unsigned i = 0; i < 4; i++) + encoding |= vop3->opsel[i] << (11+i); if (instr->definitions.size() == 2) encoding |= instr->definitions[1].physReg() << 8; encoding |= (0xFF & instr->definitions[0].physReg().reg); diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index b393ef15283..22692516098 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -665,7 +665,7 @@ struct VOPC_instruction : public Instruction { struct VOP3A_instruction : public Instruction { bool abs[3]; - bool opsel[3]; + bool opsel[4]; bool clamp; unsigned omod; bool neg[3];