From a5f24f966ae217981cd39e867a0de1fee029e740 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 19 Dec 2019 13:58:32 -0800 Subject: [PATCH] freedreno/ir3: a bit more optmsgs debug Also dump where arrays are allocated. This was useful for debugging. Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_ra.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 3b54bdb1893..7ea21076784 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -1204,6 +1204,16 @@ retry: ra_set_node_reg(ctx->g, name, reg); } } + + if (ir3_shader_debug & IR3_DBG_OPTMSGS) { + foreach_array (arr, &ctx->ir->array_list) { + unsigned first = arr->reg; + unsigned last = arr->reg + arr->length - 1; + debug_printf("arr[%d] at r%d.%c->r%d.%c\n", arr->id, + (first >> 2), "xyzw"[first & 0x3], + (last >> 2), "xyzw"[last & 0x3]); + } + } } static int -- 2.30.2