From: Timur Kristóf Date: Thu, 26 Sep 2019 15:47:30 +0000 (+0200) Subject: aco: Support GFX10 DS in aco_assembler. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6106d4bce9daf1a79ea84108e2362b8a78eb3429;p=mesa.git aco: Support GFX10 DS in aco_assembler. Signed-off-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 f6a3999afe4..8e44050b653 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -239,8 +239,13 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* case Format::DS: { DS_instruction* ds = static_cast(instr); uint32_t encoding = (0b110110 << 26); - encoding |= opcode << 17; - encoding |= (ds->gds ? 1 : 0) << 16; + if (ctx.chip_class == GFX8 || ctx.chip_class == GFX9) { + encoding |= opcode << 17; + encoding |= (ds->gds ? 1 : 0) << 16; + } else { + encoding |= opcode << 18; + encoding |= (ds->gds ? 1 : 0) << 17; + } encoding |= ((0xFF & ds->offset1) << 8); encoding |= (0xFFFF & ds->offset0); out.push_back(encoding);