aco: fix emitting a16 for MIMG instructions on GFX10+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 6 Jul 2021 16:06:40 +0000 (18:06 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 7 Jul 2021 12:44:13 +0000 (14:44 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11734>

src/amd/compiler/aco_assembler.cpp

index 012c942..77d4380 100644 (file)
@@ -461,7 +461,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
       assert(!mimg.d16 || ctx.chip_class >= GFX9);
       encoding |= mimg.d16 ? 1 << 31 : 0;
       if (ctx.chip_class >= GFX10) {
-         encoding |= mimg.a16 ? 1 << 14 : 0; /* GFX10: A16 still exists, but is in a different place */
+         encoding |= mimg.a16 ? 1 << 30 : 0; /* GFX10: A16 still exists, but is in a different place */
       }
 
       out.push_back(encoding);