summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2020-01-16 09:11:16 -0500
committerMarge Bot <eric+marge@anholt.net>2020-01-23 17:06:57 +0000
commitf77369086ced2a76dd33358d28b7bb0706b1157f (patch)
treea7e7477886a87964f32bac39012cc22dd97df076 /src/mesa
parent1496cc92f6f743f10e1f3c9c63787d79febfda40 (diff)
util/hash_table: update users to use new optimal integer hash functions
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 536fe36e5e4..8c1a6a722f5 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -166,18 +166,6 @@ static uint64_t vma_alloc(struct brw_bufmgr *bufmgr,
enum brw_memory_zone memzone,
uint64_t size, uint64_t alignment);
-static uint32_t
-key_hash_uint(const void *key)
-{
- return _mesa_hash_data(key, 4);
-}
-
-static bool
-key_uint_equal(const void *a, const void *b)
-{
- return *((unsigned *) a) == *((unsigned *) b);
-}
-
static struct brw_bo *
hash_find_bo(struct hash_table *ht, unsigned int key)
{
@@ -1739,9 +1727,9 @@ brw_bufmgr_init(struct gen_device_info *devinfo, int fd, bool bo_reuse)
init_cache_buckets(bufmgr);
bufmgr->name_table =
- _mesa_hash_table_create(NULL, key_hash_uint, key_uint_equal);
+ _mesa_hash_table_create(NULL, _mesa_hash_uint, _mesa_key_uint_equal);
bufmgr->handle_table =
- _mesa_hash_table_create(NULL, key_hash_uint, key_uint_equal);
+ _mesa_hash_table_create(NULL, _mesa_hash_uint, _mesa_key_uint_equal);
return bufmgr;
}