mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
mesa: use pre_hashed version of search for the mesa hash table
The key is just an unsigned int so there is never any real hashing done. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
d0f381f865
commit
c72170fb1f
1 changed files with 6 additions and 2 deletions
|
|
@ -183,7 +183,9 @@ _mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key)
|
||||||
if (key == DELETED_KEY_VALUE)
|
if (key == DELETED_KEY_VALUE)
|
||||||
return table->deleted_key_data;
|
return table->deleted_key_data;
|
||||||
|
|
||||||
entry = _mesa_hash_table_search(table->ht, uint_key(key));
|
entry = _mesa_hash_table_search_pre_hashed(table->ht,
|
||||||
|
uint_hash(key),
|
||||||
|
uint_key(key));
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
@ -347,7 +349,9 @@ _mesa_HashRemove_unlocked(struct _mesa_HashTable *table, GLuint key)
|
||||||
if (key == DELETED_KEY_VALUE) {
|
if (key == DELETED_KEY_VALUE) {
|
||||||
table->deleted_key_data = NULL;
|
table->deleted_key_data = NULL;
|
||||||
} else {
|
} else {
|
||||||
entry = _mesa_hash_table_search(table->ht, uint_key(key));
|
entry = _mesa_hash_table_search_pre_hashed(table->ht,
|
||||||
|
uint_hash(key),
|
||||||
|
uint_key(key));
|
||||||
_mesa_hash_table_remove(table->ht, entry);
|
_mesa_hash_table_remove(table->ht, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue