aco: Support GFX10 VINTRP in aco_assembler.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 26 Sep 2019 15:46:43 +0000 (17:46 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Thu, 10 Oct 2019 07:57:52 +0000 (09:57 +0200)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_assembler.cpp

index a9fefb832a9721e9e1b9a39a2cb1a28f5f010770..f6a3999afe44a03a85865b8f13ddf77ce17bf494 100644 (file)
@@ -216,7 +216,15 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
    }
    case Format::VINTRP: {
       Interp_instruction* interp = static_cast<Interp_instruction*>(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;