uint8_t channels;
};
-static uint32_t
-int_hash(const void *key)
-{
- return _mesa_hash_data(key, sizeof(int));
-}
-
-static bool
-int_compare(const void *key1, const void *key2)
-{
- return *(const int *)key1 == *(const int *)key2;
-}
-
static int
vir_reg_to_var(struct qreg reg)
{
vir_setup_def_use(struct v3d_compile *c)
{
struct hash_table *partial_update_ht =
- _mesa_hash_table_create(c, int_hash, int_compare);
+ _mesa_hash_table_create(c, _mesa_hash_int, _mesa_key_int_equal);
int ip = 0;
vir_for_each_block(block, c) {
static pthread_mutex_t etna_drm_table_lock = PTHREAD_MUTEX_INITIALIZER;
-static uint32_t
-u32_hash(const void *key)
-{
- return _mesa_hash_data(key, sizeof(uint32_t));
-}
-
-static bool
-u32_equals(const void *key1, const void *key2)
-{
- return *(const uint32_t *)key1 == *(const uint32_t *)key2;
-}
-
struct etna_device *etna_device_new(int fd)
{
struct etna_device *dev = calloc(sizeof(*dev), 1);
p_atomic_set(&dev->refcnt, 1);
dev->fd = fd;
- dev->handle_table = _mesa_hash_table_create(NULL, u32_hash, u32_equals);
- dev->name_table = _mesa_hash_table_create(NULL, u32_hash, u32_equals);
+ dev->handle_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
+ dev->name_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
etna_bo_cache_init(&dev->bo_cache);
ret = drmCommandWriteRead(dev->fd, DRM_ETNAVIV_GET_PARAM, &req, sizeof(req));
static pthread_mutex_t table_lock = PTHREAD_MUTEX_INITIALIZER;
-static uint32_t
-u32_hash(const void *key)
-{
- return _mesa_hash_data(key, sizeof(uint32_t));
-}
-
-static bool
-u32_equals(const void *key1, const void *key2)
-{
- return *(const uint32_t *)key1 == *(const uint32_t *)key2;
-}
-
-
struct fd_device * kgsl_device_new(int fd);
struct fd_device * msm_device_new(int fd);
p_atomic_set(&dev->refcnt, 1);
dev->fd = fd;
- dev->handle_table = _mesa_hash_table_create(NULL, u32_hash, u32_equals);
- dev->name_table = _mesa_hash_table_create(NULL, u32_hash, u32_equals);
+ dev->handle_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
+ dev->name_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
fd_bo_cache_init(&dev->bo_cache, FALSE);
fd_bo_cache_init(&dev->ring_cache, TRUE);
enum iris_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 iris_bo *
find_and_ref_external_bo(struct hash_table *ht, unsigned int key)
{
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);
if (devinfo->gen >= 12) {
bufmgr->aux_map_ctx = gen_aux_map_init(bufmgr, &aux_map_allocator,
uint8_t channels;
};
-static uint32_t
-int_hash(const void *key)
-{
- return _mesa_hash_data(key, sizeof(int));
-}
-
-static bool
-int_compare(const void *key1, const void *key2)
-{
- return *(const int *)key1 == *(const int *)key2;
-}
-
static int
qir_reg_to_var(struct qreg reg)
{
qir_setup_def_use(struct vc4_compile *c)
{
struct hash_table *partial_update_ht =
- _mesa_hash_table_create(c, int_hash, int_compare);
+ _mesa_hash_table_create(c, _mesa_hash_int, _mesa_key_int_equal);
int ip = 0;
qir_for_each_block(block, c) {
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)
{
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;
}