nouveau/codegen: allow tex offsets on non-TXF instructions (e.g. TXL)
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 4 Feb 2014 07:53:54 +0000 (02:53 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 6 Feb 2014 23:50:19 +0000 (18:50 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp

index 33ebb54da9776956383a657a723930210be4183a..d7c06a49658d9c6c7bf9b251c83a7f11d6c6e325 100644 (file)
@@ -1728,6 +1728,14 @@ Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy)
    if (tgsi.getOpcode() == TGSI_OPCODE_SAMPLE_C_LZ)
       texi->tex.levelZero = true;
 
+   for (s = 0; s < tgsi.getNumTexOffsets(); ++s) {
+      for (c = 0; c < 3; ++c) {
+         texi->tex.offset[s][c] = tgsi.getTexOffset(s).getValueU32(c, info);
+         if (texi->tex.offset[s][c])
+            texi->tex.useOffsets = s + 1;
+      }
+   }
+
    bb->insertTail(texi);
 }