summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2021-03-01 18:59:27 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2021-04-11 12:31:22 -0400
commit0dfc5b51967ea9645e22cf35f459a153dd85473d (patch)
tree97584012ac4d8680d87b5ec6f0757788bed4160c
parentd0fa6e066b3c91be7196dc392b95dbf97445ac96 (diff)
nv50/ir: fix emission of ld/st lock/unlock
This is necessary to implement shared atomics. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp5
1 files changed, 5 insertions, 0 deletions
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;