diff options
author | Timur Kristóf <[email protected]> | 2019-09-26 17:47:51 +0200 |
---|---|---|
committer | Timur Kristóf <[email protected]> | 2019-10-10 09:57:52 +0200 |
commit | 9e27816252b9090868dbff1f1e640a7e99c13a97 (patch) | |
tree | d4ef7c62fdff42824dd7a6d2f9a5e8f2e2a484d5 | |
parent | 6106d4bce9daf1a79ea84108e2362b8a78eb3429 (diff) |
aco: Support GFX10 MUBUF in aco_assembler.
Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
-rw-r--r-- | src/amd/compiler/aco_assembler.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 8e44050b653..5136001abcb 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -264,14 +264,22 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* MUBUF_instruction* mubuf = static_cast<MUBUF_instruction*>(instr); uint32_t encoding = (0b111000 << 26); encoding |= opcode << 18; - encoding |= (mubuf->slc ? 1 : 0) << 17; encoding |= (mubuf->lds ? 1 : 0) << 16; encoding |= (mubuf->glc ? 1 : 0) << 14; encoding |= (mubuf->idxen ? 1 : 0) << 13; encoding |= (mubuf->offen ? 1 : 0) << 12; + if (ctx.chip_class <= GFX9) { + assert(!mubuf->dlc); /* Device-level coherent is not supported on GFX9 and lower */ + encoding |= (mubuf->slc ? 1 : 0) << 17; + } else if (ctx.chip_class >= GFX10) { + encoding |= (mubuf->dlc ? 1 : 0) << 15; + } encoding |= 0x0FFF & mubuf->offset; out.push_back(encoding); encoding = 0; + if (ctx.chip_class >= GFX10) { + encoding |= (mubuf->slc ? 1 : 0) << 22; + } encoding |= instr->operands[2].physReg() << 24; encoding |= (mubuf->tfe ? 1 : 0) << 23; encoding |= (instr->operands[1].physReg() >> 2) << 16; |