diff options
author | Ilia Mirkin <[email protected]> | 2016-01-10 21:47:04 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-01-29 21:22:48 -0500 |
commit | df043f076464d817a9d88c4c43757e65b6eae3f9 (patch) | |
tree | 3ca9ecc0bff1fcfbc30976d9d692eb39cf9ea4c6 /src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | |
parent | 7b9a77b905bda3003dc57efb99879499ebc4ba41 (diff) |
nvc0/ir: fix atomic compare-and-swap arguments
Teach the emitter that the two registers are sequential, and drop the
second arg entirely, in favor of a double-wide first argument.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp index 0b28047e22b..6cf69e5339f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp @@ -2021,8 +2021,10 @@ CodeEmitterNVC0::emitATOM(const Instruction *i) code[0] |= 63 << 20; } - if (i->subOp == NV50_IR_SUBOP_ATOM_CAS) - srcId(i->src(2), 32 + 17); + if (i->subOp == NV50_IR_SUBOP_ATOM_CAS) { + assert(i->src(1).getSize() == 2 * typeSizeof(i->sType)); + code[1] |= (SDATA(i->src(1)).id + 1) << 17; + } } void |