zink: pre-size descriptor transition hash table
this avoids costly rehashing Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>
This commit is contained in:
committed by
Marge Bot
parent
80d9f3aa34
commit
dc020db723
@@ -745,6 +745,7 @@ update_descriptors(struct zink_context *ctx, struct zink_screen *screen, bool is
|
||||
struct zink_transition transitions[num_bindings];
|
||||
int num_transitions = 0;
|
||||
struct set *ht = _mesa_set_create(NULL, transition_hash, transition_equals);
|
||||
_mesa_set_resize(ht, num_bindings);
|
||||
|
||||
|
||||
bool need_flush = false;
|
||||
|
||||
Reference in New Issue
Block a user