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 d5c9570..8085bb2 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 7db9bf0..5dcbf3c 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) {