From 0dfc5b51967ea9645e22cf35f459a153dd85473d Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Mon, 1 Mar 2021 18:59:27 -0500 Subject: nv50/ir: fix emission of ld/st lock/unlock This is necessary to implement shared atomics. Signed-off-by: Ilia Mirkin Acked-by: Pierre Moreau Part-of: --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp index 18d6541a4d7..64d64b94a12 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -644,6 +644,9 @@ CodeEmitterNV50::emitLOAD(const Instruction *i) code[1] |= 0x04000000; emitLoadStoreSizeCS(i->sType); + + if (i->subOp == NV50_IR_SUBOP_LOAD_LOCKED) + code[1] |= 0x00800000; } else { assert(offset <= (int32_t)(0x1f * typeSizeof(i->sType))); code[0] = 0x10000001; @@ -714,6 +717,8 @@ CodeEmitterNV50::emitSTORE(const Instruction *i) case FILE_MEMORY_SHARED: code[0] = 0x00000001; code[1] = 0xe0000000; + if (i->subOp == NV50_IR_SUBOP_STORE_UNLOCKED) + code[1] |= 0x00800000; switch (typeSizeof(i->dType)) { case 1: code[0] |= offset << 9; -- cgit v1.2.3