freedreno/ir3: a bit more optmsgs debug
Also dump where arrays are allocated. This was useful for debugging.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c
index 3b54bdb..7ea2107 100644
--- a/src/freedreno/ir3/ir3_ra.c
+++ b/src/freedreno/ir3/ir3_ra.c
@@ -1204,6 +1204,16 @@
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