Zebediah Figura : d3dcompiler: Dump flattened IR more accurately.
Alexandre Julliard
julliard at winehq.org
Tue Feb 11 15:44:54 CST 2020
Module: wine
Branch: master
Commit: e6f89bcb04344e585fd0176ae3b4e1e9c991784d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e6f89bcb04344e585fd0176ae3b4e1e9c991784d
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Wed Feb 5 14:52:34 2020 -0600
d3dcompiler: Dump flattened IR more accurately.
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 | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index b2b1e25bbd..c615b37e25 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -1789,6 +1789,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)
@@ -1808,13 +1813,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;
}
@@ -1945,7 +1950,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(")");
@@ -1958,7 +1963,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(")");
@@ -1986,11 +1991,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(")");
}
@@ -1998,7 +2003,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)
{
@@ -2030,7 +2035,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;
}
@@ -2039,7 +2044,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");
@@ -2053,6 +2058,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:
More information about the wine-cvs
mailing list