d3dcompiler: Print the data type when dumping IR.

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-06-22 17:47:21 -05:00 committed by Alexandre Julliard
parent 56be9dde92
commit d60b126b24
1 changed files with 8 additions and 3 deletions

View File

@ -1806,9 +1806,11 @@ static void debug_dump_ir_var(const struct hlsl_ir_var *var)
static void debug_dump_deref(const struct hlsl_deref *deref) static void debug_dump_deref(const struct hlsl_deref *deref)
{ {
wine_dbg_printf("deref("); if (deref->offset)
debug_dump_ir_var(deref->var); /* Print the variable's type for convenience. */
wine_dbg_printf(")"); wine_dbg_printf("(%s %s)", debug_hlsl_type(deref->var->data_type), deref->var->name);
else
wine_dbg_printf("%s", deref->var->name);
if (deref->offset) if (deref->offset)
{ {
wine_dbg_printf("["); wine_dbg_printf("[");
@ -2045,6 +2047,9 @@ static void debug_dump_instr(const struct hlsl_ir_node *instr)
wine_dbg_printf("%4u: ", instr->index); wine_dbg_printf("%4u: ", instr->index);
else else
wine_dbg_printf("%p: ", instr); wine_dbg_printf("%p: ", instr);
wine_dbg_printf("%10s | ", instr->data_type ? debug_hlsl_type(instr->data_type) : "");
switch (instr->type) switch (instr->type)
{ {
case HLSL_IR_EXPR: case HLSL_IR_EXPR: