From bbe87eb6c39e991fcb737ed31f053b44656fe5f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Thu, 26 Sep 2019 17:46:43 +0200 Subject: [PATCH] aco: Support GFX10 VINTRP in aco_assembler. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann --- src/amd/compiler/aco_assembler.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index a9fefb832a9..f6a3999afe4 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -216,7 +216,15 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* } case Format::VINTRP: { Interp_instruction* interp = static_cast(instr); - uint32_t encoding = (0b110101 << 26); + uint32_t encoding = 0; + + if (ctx.chip_class == GFX8 || ctx.chip_class == GFX9) { + encoding = (0b110101 << 26); /* Vega ISA doc says 110010 but it's wrong */ + } else { + encoding = (0b110010 << 26); + } + + assert(encoding); encoding |= (0xFF & instr->definitions[0].physReg().reg) << 18; encoding |= opcode << 16; encoding |= interp->attribute << 10; -- 2.30.2