mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
util/ra: Bump the initial size of adjacency lists
For Intel, looking at a few fossils, the majority of nodes have more than 32 entries in the list. I'd expect other backends to have similar numbers. Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
This commit is contained in:
parent
9cccb89dbc
commit
298740d7a1
1 changed files with 1 additions and 1 deletions
|
|
@ -519,7 +519,7 @@ ra_add_node_adjacency(struct ra_graph *g, unsigned int n1, unsigned int n2)
|
|||
|
||||
struct ra_list *adj = &g->nodes[n1].adjacency;
|
||||
if (adj->size == adj->cap) {
|
||||
adj->cap = MAX2(16, adj->cap * 2);
|
||||
adj->cap = MAX2(64, adj->cap * 2);
|
||||
adj->elems = reralloc(g, adj->elems, unsigned int, adj->cap);
|
||||
}
|
||||
adj->elems[adj->size++] = n2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue