aco: Support GFX10 EXP in aco_assembler.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 26 Sep 2019 15:50:48 +0000 (17:50 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Thu, 10 Oct 2019 07:57:53 +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 39bf9eca21c7bee7422f2377a5ba1f94439d3dbf..9070d88e1c6457eb0f4dd5202388a049b08a9004 100644 (file)
@@ -415,7 +415,13 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
    }
    case Format::EXP: {
       Export_instruction* exp = static_cast<Export_instruction*>(instr);
-      uint32_t encoding = (0b110001 << 26);
+      uint32_t encoding;
+      if (ctx.chip_class <= GFX9) {
+         encoding = (0b110001 << 26);
+      } else if (ctx.chip_class >= GFX10) {
+         encoding = (0b111110 << 26);
+      }
+
       encoding |= exp->valid_mask ? 0b1 << 12 : 0;
       encoding |= exp->done ? 0b1 << 11 : 0;
       encoding |= exp->compressed ? 0b1 << 10 : 0;