mesa: remove _mesa_HashTable::InDeleteAll

It's not necessary if we don't remove entries from the hash table,
which we don't have to do because we are going to destroy it anyway.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
This commit is contained in:
Marek Olšák 2024-02-06 02:28:56 -05:00 committed by Marge Bot
parent 8ca750a8b6
commit bfe6d389a0
2 changed files with 0 additions and 21 deletions

View file

@ -148,23 +148,12 @@ _mesa_DeleteHashTable(struct _mesa_HashTable *table,
void *userData)
{
if (free_callback) {
#ifndef NDEBUG
table->InDeleteAll = GL_TRUE;
#endif
hash_table_foreach(table->ht, entry) {
free_callback(entry->data, userData);
_mesa_hash_table_remove(table->ht, entry);
}
if (table->deleted_key_data) {
free_callback(table->deleted_key_data, userData);
}
#ifndef NDEBUG
table->InDeleteAll = GL_FALSE;
#endif
}
if (_mesa_hash_table_next_entry(table->ht, NULL) != NULL) {
_mesa_problem(NULL, "In _mesa_DeleteHashTable, found non-freed data");
}
_mesa_hash_table_destroy(table->ht, NULL);
@ -315,13 +304,6 @@ _mesa_HashRemoveLocked(struct _mesa_HashTable *table, GLuint key)
assert(key);
#ifndef NDEBUG
/* assert if _mesa_HashRemove illegally called from _mesa_DeleteHashTable
* callback function. Have to check this outside of mutex lock.
*/
assert(!table->InDeleteAll);
#endif
if (key == DELETED_KEY_VALUE) {
table->deleted_key_data = NULL;
} else {

View file

@ -51,9 +51,6 @@ struct _mesa_HashTable {
/** Value that would be in the table for DELETED_KEY_VALUE. */
void *deleted_key_data;
#ifndef NDEBUG
GLboolean InDeleteAll; /**< Debug check */
#endif
};
struct _mesa_HashTable *