From: Ilia Mirkin Date: Sun, 5 Feb 2017 04:57:53 +0000 (-0500) Subject: nvc0/ir: fix SET and SLCT emission X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e986fa80688b22657201d483888ddbc5d2be19b;p=mesa.git 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 --- 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);