aco: fix emitting slc for MUBUF instructions on GFX6-GFX7
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 17 Jan 2020 07:22:48 +0000 (08:22 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 17 Jan 2020 15:56:04 +0000 (16:56 +0100)
Same as GFX10, only GFX8/GFX9 moved that bit near the opcode.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3437>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3437>

src/amd/compiler/aco_assembler.cpp

index a9dd6b441e2a35915d973f95d7a4a548bbb3c479..dc341e59de0cb1238309feb08cc41eeeb7fb9045 100644 (file)
@@ -321,7 +321,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
       encoding |= 0x0FFF & mubuf->offset;
       out.push_back(encoding);
       encoding = 0;
-      if (ctx.chip_class >= GFX10) {
+      if (ctx.chip_class <= GFX7 || ctx.chip_class >= GFX10) {
          encoding |= (mubuf->slc ? 1 : 0) << 22;
       }
       encoding |= instr->operands[2].physReg() << 24;