Zebediah Figura : d3dcompiler: Handle loops in free_instr().

Alexandre Julliard julliard at winehq.org
Sun Feb 16 15:23:58 CST 2020


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Tue Feb 11 22:54:18 2020 -0600

d3dcompiler: Handle loops in free_instr().

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 | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index 3f5a57ffa4..a1470cd0f5 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -2202,6 +2202,12 @@ static void free_ir_if(struct hlsl_ir_if *if_node)
     d3dcompiler_free(if_node);
 }
 
+static void free_ir_loop(struct hlsl_ir_loop *loop)
+{
+    free_instr_list(loop->body);
+    d3dcompiler_free(loop);
+}
+
 static void free_ir_jump(struct hlsl_ir_jump *jump)
 {
     d3dcompiler_free(jump);
@@ -2232,6 +2238,9 @@ void free_instr(struct hlsl_ir_node *node)
         case HLSL_IR_IF:
             free_ir_if(if_from_node(node));
             break;
+        case HLSL_IR_LOOP:
+            free_ir_loop(loop_from_node(node));
+            break;
         case HLSL_IR_JUMP:
             free_ir_jump(jump_from_node(node));
             break;




More information about the wine-cvs mailing list