diff options
author | Ilia Mirkin <[email protected]> | 2017-02-04 23:57:53 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-02-09 12:57:48 -0500 |
commit | 2e986fa80688b22657201d483888ddbc5d2be19b (patch) | |
tree | a38f4170f285b9268e6d96af915fa81e39538a42 /src/gallium/drivers | |
parent | eac5099c11c27aa49901846e254c92a4bd1723e2 (diff) |
nvc0/ir: fix SET and SLCT emission
We were never emitting a .X flag for consuming condition code on SET,
and weren't emitting a signed type for SLCT comparison. Discovered while
working on int64 logic.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index 4f2d817763c..4b1caa48754 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -1142,6 +1142,8 @@ CodeEmitterGK110::emitSET(const CmpInstruction *i) } else { code[1] |= 0x7 << 10; } + if (i->flagsSrc >= 0) + code[1] |= 1 << 14; emitCondCode(i->setCond, isFloatType(i->sType) ? 0x33 : 0x34, isFloatType(i->sType) ? 0xf : 0x7); @@ -1161,6 +1163,8 @@ CodeEmitterGK110::emitSLCT(const CmpInstruction *i) } else { emitForm_21(i, 0x1a0, 0xb20); emitCondCode(cc, 0x34, 0x7); + if (i->dType == TYPE_S32) + code[1] |= 1 << 19; } } 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 b64ac61bf48..145868813e3 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp @@ -1194,6 +1194,8 @@ CodeEmitterNVC0::emitSET(const CmpInstruction *i) if (i->ftz) code[1] |= 1 << 27; + if (i->flagsSrc >= 0) + code[0] |= 1 << 6; emitCondCode(i->setCond, 32 + 23); emitNegAbs12(i); |