Mesa (master): aco: fix assembly of FLAT/GLOBAL atomics

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 29 18:07:21 UTC 2019


Module: Mesa
Branch: master
Commit: 082e3a68fada731757ee06d1afdfa2cf654a0ad9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=082e3a68fada731757ee06d1afdfa2cf654a0ad9

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Wed Nov 27 17:06:10 2019 +0000

aco: fix assembly of FLAT/GLOBAL atomics

They can take both a definition and data operand

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>

---

 src/amd/compiler/aco_assembler.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp
index 4b70b2c0ac7..c9b5ca10684 100644
--- a/src/amd/compiler/aco_assembler.cpp
+++ b/src/amd/compiler/aco_assembler.cpp
@@ -425,7 +425,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
       encoding = (0xFF & instr->operands[0].physReg());
       if (!instr->definitions.empty())
          encoding |= (0xFF & instr->definitions[0].physReg()) << 24;
-      else
+      if (instr->operands.size() >= 3)
          encoding |= (0xFF & instr->operands[2].physReg()) << 8;
       if (!instr->operands[1].isUndefined()) {
          assert(ctx.chip_class >= GFX10 || instr->operands[1].physReg() != 0x7F);




More information about the mesa-commit mailing list