freedreno/ir3: a bit more optmsgs debug
authorRob Clark <robdclark@chromium.org>
Thu, 19 Dec 2019 21:58:32 +0000 (13:58 -0800)
committerMarge Bot <eric+marge@anholt.net>
Sat, 1 Feb 2020 02:40:22 +0000 (02:40 +0000)
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>

src/freedreno/ir3/ir3_ra.c

index 3b54bdb189325957ad6ff4a0c73b34189a0df7ed..7ea210767847b74b4a08254998b8e9b2f3c22dc8 100644 (file)
@@ -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