}
}
-#define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x)))
-
-static unsigned handle_hash(void *key)
-{
- return PTR_TO_UINT(key);
-}
-
-static int handle_compare(void *key1, void *key2)
-{
- return PTR_TO_UINT(key1) != PTR_TO_UINT(key2);
-}
-
static bool
vc4_get_chip_info(struct vc4_screen *screen)
{
list_inithead(&screen->bo_cache.time_list);
(void) mtx_init(&screen->bo_handles_mutex, mtx_plain);
- screen->bo_handles = util_hash_table_create(handle_hash, handle_compare);
+ screen->bo_handles = util_hash_table_create_ptr_keys();
screen->has_control_flow =
vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_BRANCHES);