summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-03-12 09:33:00 -0400
committerIlia Mirkin <[email protected]>2014-03-18 05:56:54 -0400
commit4bb14aca293b12cbe4f2352fb11c20091876c1cf (patch)
tree64fb360005896af774d041c39989549b7bc35411 /src/gallium/drivers
parent67cb8a69960b37a2cfad2a7bc62b8db6aa7558bb (diff)
nv50/ir/gk110: implement quadop
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.cpp12
1 files changed, 11 insertions, 1 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 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