Zebediah Figura : d3dcompiler: Print the data type when dumping IR.

Alexandre Julliard julliard at winehq.org
Mon Jun 29 14:59:20 CDT 2020


Module: wine
Branch: master
Commit: d60b126b24398d75e1781dc852a0f5b2d67a895f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d60b126b24398d75e1781dc852a0f5b2d67a895f

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Jun 22 17:47:21 2020 -0500

d3dcompiler: Print the data type when dumping IR.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/utils.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index aadad17691..30aa9de1dd 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -1806,9 +1806,11 @@ static void debug_dump_ir_var(const struct hlsl_ir_var *var)
 
 static void debug_dump_deref(const struct hlsl_deref *deref)
 {
-    wine_dbg_printf("deref(");
-    debug_dump_ir_var(deref->var);
-    wine_dbg_printf(")");
+    if (deref->offset)
+        /* Print the variable's type for convenience. */
+        wine_dbg_printf("(%s %s)", debug_hlsl_type(deref->var->data_type), deref->var->name);
+    else
+        wine_dbg_printf("%s", deref->var->name);
     if (deref->offset)
     {
         wine_dbg_printf("[");
@@ -2045,6 +2047,9 @@ static void debug_dump_instr(const struct hlsl_ir_node *instr)
         wine_dbg_printf("%4u: ", instr->index);
     else
         wine_dbg_printf("%p: ", instr);
+
+    wine_dbg_printf("%10s | ", instr->data_type ? debug_hlsl_type(instr->data_type) : "");
+
     switch (instr->type)
     {
         case HLSL_IR_EXPR:




More information about the wine-cvs mailing list