Skip to content

util,mesa: switch _mesa_HashTable to sparse_array (complete rewrite), new util_idtable, etc.

Marek Olšák requested to merge mareko/mesa:mesa-hashtable-rewrite into main

This improves a score in one viewperf subtest by 5%.

There is a new data structure util_idtable that can replace hash_table where only uint32_t keys are needed. _mesa_HashTable uses it and adds a mutex on top of it.

The first half of the MR adds features to util_idalloc that we need. Then, util_idtable is added, which is a combination of util_idalloc for managing IDs and util_sparse_array for storage. Then, _mesa_HashTable is rewritten, simplified, and cleaned up.

Edited by Marek Olšák

Merge request reports