nv50/ir: add scalar field to TexInstructions
authorKarol Herbst <kherbst@redhat.com>
Sun, 5 Aug 2018 17:12:48 +0000 (19:12 +0200)
committerKarol Herbst <kherbst@redhat.com>
Tue, 6 Nov 2018 18:57:05 +0000 (19:57 +0100)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir.h
src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp

index d5c9570a56b9d23939f6031d8162fd3e97c50ef0..8085bb2f542072da91b474d3ccbc7662c2017c0a 100644 (file)
@@ -1058,6 +1058,8 @@ public:
 
       enum TexQuery query;
       const struct ImgFormatDesc *format;
+
+      bool scalar; // for GM107s TEXS, TLDS, TLD4S
    } tex;
 
    ValueRef dPdx[3];
index 7db9bf0caa27ddd5c78187e2f8bc17510a809476..5dcbf3c3e0c2449682dabb3489db5076ae0408cb 100644 (file)
@@ -612,7 +612,10 @@ void Instruction::print() const
       if (asFlow()->target.bb)
          PRINT(" %sBB:%i", colour[TXT_BRA], asFlow()->target.bb->getId());
    } else {
-      PRINT("%s ", operationStr[op]);
+      if (asTex())
+         PRINT("%s%s ", operationStr[op], asTex()->tex.scalar ? "s" : "");
+      else
+         PRINT("%s ", operationStr[op]);
       if (op == OP_LINTERP || op == OP_PINTERP)
          PRINT("%s ", interpStr[ipa]);
       switch (op) {