[Mesa-dev] [PATCH 1/4] nv50/ir: print color masks of tex instructions

Karol Herbst kherbst at redhat.com
Mon Aug 6 19:32:29 UTC 2018


Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
 .../drivers/nouveau/codegen/nv50_ir_print.cpp | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp
index ee3506fbaee..57e221df7ad 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp
@@ -353,6 +353,31 @@ static const char *interpStr[16] =
    "samp sc"
 };
 
+static const char *texMaskStr[16] =
+{
+   "",
+   "r",
+   "g",
+   "rg",
+   "b",
+   "rb",
+   "gb",
+   "rgb",
+   "a",
+   "ra",
+   "ga",
+   "rga",
+   "ba",
+   "rba",
+   "gba",
+   "rgba",
+};
+
+static const char *gatherCompStr[4] =
+{
+   "r", "g", "b", "a",
+};
+
 #define PRINT(args...)                                \
    do {                                               \
       pos += snprintf(&buf[pos], size - pos, args);   \
@@ -633,8 +658,10 @@ void Instruction::print() const
       if (perPatch)
          PRINT("patch ");
       if (asTex())
-         PRINT("%s %s$r%u $s%u %s", asTex()->tex.target.getName(),
+         PRINT("%s %s$r%u $s%u %s %s", asTex()->tex.target.getName(),
                colour[TXT_MEM], asTex()->tex.r, asTex()->tex.s,
+               op == OP_TXG ? gatherCompStr[asTex()->tex.gatherComp]
+                            : texMaskStr[asTex()->tex.mask],
                colour[TXT_INSN]);
       if (postFactor)
          PRINT("x2^%i ", postFactor);
-- 
2.17.1



More information about the mesa-dev mailing list