On 02/17/2016 10:33 PM, Ilia Mirkin wrote:
Fix gk110 emitter for the updated logic? (Looks like no SELP on GM107?
Perhaps just not implemented yet...)
Pretty sure that SELP won't be useful for shared+atomics on GK110+
because I don't use it GK104 IIRC.
On Wed, Feb 17, 2016 at 4:27 PM, Samuel Pitoiset
<samuel.pitoi...@gmail.com> wrote:
This OP_SELP insn will be used to handle compare and swap subops.
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 8 ++++----
src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h | 4 ++--
2 files changed, 6 insertions(+), 6 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 a7c49a2..6566d24 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
@@ -120,7 +120,7 @@ private:
void emitSET(const CmpInstruction *);
void emitSLCT(const CmpInstruction *);
- void emitSELP(const Instruction *);
+ void emitSELP(const CmpInstruction *);
void emitTEXBAR(const Instruction *);
void emitTEX(const TexInstruction *);
@@ -1170,11 +1170,11 @@ CodeEmitterNVC0::emitSLCT(const CmpInstruction *i)
code[0] |= 1 << 5;
}
-void CodeEmitterNVC0::emitSELP(const Instruction *i)
+void CodeEmitterNVC0::emitSELP(const CmpInstruction *i)
{
emitForm_A(i, HEX64(20000000, 00000004));
- if (i->cc == CC_NOT_P || i->src(2).mod & Modifier(NV50_IR_MOD_NOT))
+ if (i->setCond == CC_NOT_P || i->src(2).mod & Modifier(NV50_IR_MOD_NOT))
code[1] |= 1 << 20;
}
@@ -2433,7 +2433,7 @@ CodeEmitterNVC0::emitInstruction(Instruction *insn)
emitSET(insn->asCmp());
break;
case OP_SELP:
- emitSELP(insn);
+ emitSELP(insn->asCmp());
break;
case OP_SLCT:
emitSLCT(insn->asCmp());
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
index e465f24..02e6157 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
@@ -281,14 +281,14 @@ Value *TexInstruction::getIndirectS() const
CmpInstruction *Instruction::asCmp()
{
- if (op >= OP_SET_AND && op <= OP_SLCT && op != OP_SELP)
+ if (op >= OP_SET_AND && op <= OP_SLCT)
return static_cast<CmpInstruction *>(this);
return NULL;
}
const CmpInstruction *Instruction::asCmp() const
{
- if (op >= OP_SET_AND && op <= OP_SLCT && op != OP_SELP)
+ if (op >= OP_SET_AND && op <= OP_SLCT)
return static_cast<const CmpInstruction *>(this);
return NULL;
}
--
2.6.4
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev