Zebediah Figura : d3dcompiler: Dump loops.

Alexandre Julliard julliard at winehq.org
Tue Feb 11 15:44:54 CST 2020


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Wed Feb  5 14:52:36 2020 -0600

d3dcompiler: Dump loops.

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, 11 insertions(+)

diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index 9eaa65e80f..0cae62b60f 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -1767,6 +1767,7 @@ static const char *debug_node_type(enum hlsl_ir_node_type type)
         "HLSL_IR_DEREF",
         "HLSL_IR_EXPR",
         "HLSL_IR_IF",
+        "HLSL_IR_LOOP",
         "HLSL_IR_JUMP",
         "HLSL_IR_SWIZZLE",
     };
@@ -2056,6 +2057,13 @@ static void debug_dump_ir_if(const struct hlsl_ir_if *if_node)
     }
 }
 
+static void debug_dump_ir_loop(const struct hlsl_ir_loop *loop)
+{
+    wine_dbg_printf("for (;;)\n{\n");
+    debug_dump_instr_list(loop->body);
+    wine_dbg_printf("}\n");
+}
+
 static void debug_dump_instr(const struct hlsl_ir_node *instr)
 {
     wine_dbg_printf("%p: ", instr);
@@ -2085,6 +2093,9 @@ static void debug_dump_instr(const struct hlsl_ir_node *instr)
         case HLSL_IR_IF:
             debug_dump_ir_if(if_from_node(instr));
             break;
+        case HLSL_IR_LOOP:
+            debug_dump_ir_loop(loop_from_node(instr));
+            break;
         default:
             wine_dbg_printf("<No dump function for %s>", debug_node_type(instr->type));
     }




More information about the wine-cvs mailing list