diff options
author | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2021-07-24 14:54:34 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2021-07-24 14:54:34 -0400 |
commit | cce1a2fc196e917be5de07d20d48f300b053195c (patch) | |
tree | 89aedb071d83158d4735ac55621a5f58c6a38514 /src/asahi | |
parent | 5fb9159eb97e439e67145107b11512a66fe86cc8 (diff) |
agx: Dump register file when failing to allocate
Usually shows a bug.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053>
Diffstat (limited to 'src/asahi')
-rw-r--r-- | src/asahi/compiler/agx_register_allocate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/asahi/compiler/agx_register_allocate.c b/src/asahi/compiler/agx_register_allocate.c index 1d347aca081..b5e9000984f 100644 --- a/src/asahi/compiler/agx_register_allocate.c +++ b/src/asahi/compiler/agx_register_allocate.c @@ -89,6 +89,14 @@ agx_assign_regs(BITSET_WORD *used_regs, unsigned count, unsigned align, unsigned } } + /* Couldn't find a free register, dump the state of the register file */ + fprintf(stderr, "Failed to find register of size %u aligned %u max %u.\n", + count, align, max); + + fprintf(stderr, "Register file:\n"); + for (unsigned i = 0; i < BITSET_WORDS(max); ++i) + fprintf(stderr, " %08X\n", used_regs[i]); + unreachable("Could not find a free register"); } |