Mesa (master): nouveau/codegen: allow tex offsets on non-TXF instructions (e.g. TXL)

Ilia Mirkin imirkin at kemper.freedesktop.org
Fri Feb 7 00:41:51 UTC 2014


Module: Mesa
Branch: master
Commit: 0befbafb4b60b8d90af6a8e4013fe8d48383227d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0befbafb4b60b8d90af6a8e4013fe8d48383227d

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue Feb  4 02:53:54 2014 -0500

nouveau/codegen: allow tex offsets on non-TXF instructions (e.g. TXL)

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955 at student.tuwien.ac.at>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 33ebb54..d7c06a4 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -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);
 }
 




More information about the mesa-commit mailing list