nv50/ir/gk110: add pfetch support
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 11 Mar 2014 14:48:15 +0000 (10:48 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 18 Mar 2014 09:56:54 +0000 (05:56 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp

index 754a31daa85c5ef0260a1ac23f005181378e5a03..7ec3b570c8bd2ddd32d434b93bec3ae4f24d0189 100644 (file)
@@ -1175,7 +1175,15 @@ CodeEmitterGK110::emitFlow(const Instruction *i)
 void
 CodeEmitterGK110::emitPFETCH(const Instruction *i)
 {
-   emitNOP(i); // TODO
+   uint32_t prim = i->src(0).get()->reg.data.u32;
+
+   code[0] = 0x00000002 | ((prim & 0xff) << 23);
+   code[1] = 0x7f800000;
+
+   emitPredicate(i);
+
+   defId(i->def(0), 2);
+   srcId(i->src(1), 10);
 }
 
 void