Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/d3dcompiler_43/utils.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index 8f069b17ec7..81d6cccd809 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -1785,6 +1785,11 @@ static void debug_dump_instr_list(const struct list *list) } }
+static void debug_dump_src(const struct hlsl_ir_node *node) +{ + TRACE("%p", node); +} + static void debug_dump_ir_var(const struct hlsl_ir_var *var) { if (var->modifiers) @@ -1804,13 +1809,13 @@ static void debug_dump_ir_deref(const struct hlsl_ir_deref *deref) TRACE(")"); break; case HLSL_IR_DEREF_ARRAY: - debug_dump_instr(deref->v.array.array); + debug_dump_src(deref->v.array.array); TRACE("["); - debug_dump_instr(deref->v.array.index); + debug_dump_src(deref->v.array.index); TRACE("]"); break; case HLSL_IR_DEREF_RECORD: - debug_dump_instr(deref->v.record.record); + debug_dump_src(deref->v.record.record); TRACE(".%s", debugstr_a(deref->v.record.field->name)); break; } @@ -1941,7 +1946,7 @@ static void debug_dump_ir_expr(const struct hlsl_ir_expr *expr) TRACE("%s (", debug_expr_op(expr)); for (i = 0; i < 3 && expr->operands[i]; ++i) { - debug_dump_instr(expr->operands[i]); + debug_dump_src(expr->operands[i]); TRACE(" "); } TRACE(")"); @@ -1954,7 +1959,7 @@ static void debug_dump_ir_constructor(const struct hlsl_ir_constructor *construc TRACE("%s (", debug_hlsl_type(constructor->node.data_type)); for (i = 0; i < constructor->args_count; ++i) { - debug_dump_instr(constructor->args[i]); + debug_dump_src(constructor->args[i]); TRACE(" "); } TRACE(")"); @@ -1982,11 +1987,11 @@ static const char *debug_writemask(DWORD writemask) static void debug_dump_ir_assignment(const struct hlsl_ir_assignment *assign) { TRACE("= ("); - debug_dump_instr(assign->lhs); + debug_dump_src(assign->lhs); if (assign->writemask != BWRITERSP_WRITEMASK_ALL) TRACE("%s", debug_writemask(assign->writemask)); TRACE(" "); - debug_dump_instr(assign->rhs); + debug_dump_src(assign->rhs); TRACE(")"); }
@@ -1994,7 +1999,7 @@ static void debug_dump_ir_swizzle(const struct hlsl_ir_swizzle *swizzle) { unsigned int i;
- debug_dump_instr(swizzle->val); + debug_dump_src(swizzle->val); TRACE("."); if (swizzle->val->data_type->dimy > 1) { @@ -2026,7 +2031,7 @@ static void debug_dump_ir_jump(const struct hlsl_ir_jump *jump) case HLSL_IR_JUMP_RETURN: TRACE("return "); if (jump->return_value) - debug_dump_instr(jump->return_value); + debug_dump_src(jump->return_value); TRACE(";"); break; } @@ -2035,7 +2040,7 @@ static void debug_dump_ir_jump(const struct hlsl_ir_jump *jump) static void debug_dump_ir_if(const struct hlsl_ir_if *if_node) { TRACE("if ("); - debug_dump_instr(if_node->condition); + debug_dump_src(if_node->condition); TRACE(")\n{\n"); debug_dump_instr_list(if_node->then_instrs); TRACE("}\n"); @@ -2049,6 +2054,7 @@ static void debug_dump_ir_if(const struct hlsl_ir_if *if_node)
static void debug_dump_instr(const struct hlsl_ir_node *instr) { + TRACE("%p: ", instr); switch (instr->type) { case HLSL_IR_EXPR: