d3dcompiler: Handle loops in free_instr().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-02-11 22:54:18 -06:00 committed by Alexandre Julliard
parent c5aa0feec7
commit efec4f90aa

View file

@ -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;