mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 17:00:38 +02:00
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>
This commit is contained in:
parent
d0fa6e066b
commit
0dfc5b5196
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue