nv50/ir/gk110: handle derivAll flag, fix useOffsets for non-txf
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 11 Mar 2014 17:03:02 +0000 (13:03 -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 7d188c9245da47e166d9cc421c247fc81e9ec991..3aedda42801813c187f64a2bc66e05076dcd471e 100644 (file)
@@ -1035,8 +1035,8 @@ CodeEmitterGK110::emitTEX(const TexInstruction *i)
       code[1] |= 0x1000;
    }
 
-   // if (i->op != OP_TXD && i->tex.derivAll)
-   //   code[1] |= 1 << 13;
+   if (i->op != OP_TXD && i->tex.derivAll)
+      code[1] |= 0x200;
 
    emitPredicate(i);
 
@@ -1064,8 +1064,12 @@ CodeEmitterGK110::emitTEX(const TexInstruction *i)
       // ?
    }
 
-   if (i->tex.useOffsets)
-      code[1] |= 0x200;
+   if (i->tex.useOffsets) {
+      switch (i->op) {
+      case OP_TXF: code[1] |= 0x200; break;
+      default: code[1] |= 0x800; break;
+      }
+   }
 }
 
 void