From: Rob Clark Date: Thu, 19 Dec 2019 21:58:32 +0000 (-0800) Subject: freedreno/ir3: a bit more optmsgs debug X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5f24f966ae217981cd39e867a0de1fee029e740;p=mesa.git 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: --- 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