summaryrefslogtreecommitdiffstats
path: root/src/intel/tools
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-01-11 12:01:30 -0800
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-01-14 10:49:33 -0800
commit09c3ff01dfd72aa84334fe82cc3319594fc99ac6 (patch)
treedba4b7df0f7e77e9e063665f06d5d3d37aeb4658 /src/intel/tools
parent9fdded0cc34b4bdb87923707c05b8ceffb2f174c (diff)
src/intel: use new hash table and set creation helpers
Replace calls to create hash tables and sets that use _mesa_hash_pointer/_mesa_key_pointer_equal with the helpers _mesa_pointer_hash_table_create() and _mesa_pointer_set_create(). Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/intel/tools')
-rw-r--r--src/intel/tools/intel_sanitize_gpu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/tools/intel_sanitize_gpu.c b/src/intel/tools/intel_sanitize_gpu.c
index 8f4f2ff8ec6..ddfe1768b4a 100644
--- a/src/intel/tools/intel_sanitize_gpu.c
+++ b/src/intel/tools/intel_sanitize_gpu.c
@@ -110,8 +110,7 @@ add_drm_fd(int fd)
{
struct refcnt_hash_table *r = malloc(sizeof(*r));
r->refcnt = 1;
- r->t = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
- _mesa_key_pointer_equal);
+ r->t = _mesa_pointer_hash_table_create(NULL);
_mesa_hash_table_insert(fds_to_bo_sizes, (void*)(uintptr_t)fd,
(void*)(uintptr_t)r);
}
@@ -426,8 +425,7 @@ ioctl(int fd, unsigned long request, ...)
static void __attribute__ ((constructor))
init(void)
{
- fds_to_bo_sizes = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
- _mesa_key_pointer_equal);
+ fds_to_bo_sizes = _mesa_pointer_hash_table_create(NULL);
libc_open = dlsym(RTLD_NEXT, "open");
libc_close = dlsym(RTLD_NEXT, "close");
libc_fcntl = dlsym(RTLD_NEXT, "fcntl");