diff options
author | Eric Anholt <[email protected]> | 2020-04-09 14:11:51 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-29 19:46:08 +0000 |
commit | 5bcaf30aba08b718e913b10745df5e92854ed5b6 (patch) | |
tree | a364efd748df05be2502752803c51aed0e704d4b /src/util | |
parent | fc66800032946c53a01c979ee3b69ac2ba989222 (diff) |
util/ra: Sanity check that the driver selected a valid reg.
freedreno was returning -1 when it didn't pick a reg from the given bitset
due to an off-by-a-small-number error.
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4537>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/register_allocate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index faae56752cd..a65b5ea154f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -865,6 +865,7 @@ ra_select(struct ra_graph *g) } r = g->select_reg_callback(n, select_regs, g->select_reg_callback_data); + assert(r < g->regs->count); } else { /* Find the lowest-numbered reg which is not used by a member * of the graph adjacent to us. |