From 6106d4bce9daf1a79ea84108e2362b8a78eb3429 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Thu, 26 Sep 2019 17:47:30 +0200 Subject: [PATCH] aco: Support GFX10 DS 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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); -- 2.30.2