From: Ilia Mirkin Date: Wed, 12 Mar 2014 13:33:00 +0000 (-0400) Subject: nv50/ir/gk110: implement quadop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4bb14aca293b12cbe4f2352fb11c20091876c1cf;p=mesa.git nv50/ir/gk110: implement quadop 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 cd39d0ef1ea..54a06b56789 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -1104,7 +1104,17 @@ CodeEmitterGK110::emitTXQ(const TexInstruction *i) void CodeEmitterGK110::emitQUADOP(const Instruction *i, uint8_t qOp, uint8_t laneMask) { - emitNOP(i); // TODO + code[0] = 0x00000002 | ((qOp & 1) << 31); + code[1] = 0x7fc00000 | (qOp >> 1) | (laneMask << 12); + + defId(i->def(0), 2); + srcId(i->src(0), 10); + srcId(i->srcExists(1) ? i->src(1) : i->src(0), 23); + + if (i->op == OP_QUADOP && progType != Program::TYPE_FRAGMENT) + code[1] |= 1 << 9; // dall + + emitPredicate(i); } void