aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/hash_table.h
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-06-10 14:23:34 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-06-12 15:57:16 -0700
commit608257cf82f49109c8f1a2bab1d6e30fa14f9ba7 (patch)
tree7ada03a436109d63f7338c1b222225edac1f122a /src/util/hash_table.h
parenteb41ce1b012f24fc7cba664dcc12129342e26843 (diff)
i965: Fix INTEL_DEBUG=bat
Use hash_table_u64 instead of hash_table directly, since the former will also handle the special keys (deleted and freed) and allow use the whole u64 space. Fixes crash in INTEL_DEBUG=bat when using a key with value 0 -- the current value for a freed key. Fixes: b38dab101ca "util/hash_table: Assert that keys are not reserved pointers" Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/util/hash_table.h')
-rw-r--r--src/util/hash_table.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/hash_table.h b/src/util/hash_table.h
index be7b50ff1fe..87b1409c457 100644
--- a/src/util/hash_table.h
+++ b/src/util/hash_table.h
@@ -194,6 +194,10 @@ _mesa_hash_table_u64_search(struct hash_table_u64 *ht, uint64_t key);
void
_mesa_hash_table_u64_remove(struct hash_table_u64 *ht, uint64_t key);
+void
+_mesa_hash_table_u64_clear(struct hash_table_u64 *ht,
+ void (*delete_function)(struct hash_entry *entry));
+
#ifdef __cplusplus
} /* extern C */
#endif