summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_validate.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_validate.h4
-rw-r--r--src/gallium/auxiliary/util/u_debug_flush.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_stack.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_symbol.c2
-rw-r--r--src/gallium/auxiliary/util/u_hash_table.c253
-rw-r--r--src/gallium/auxiliary/util/u_hash_table.h28
-rw-r--r--src/gallium/drivers/lima/lima_screen.h4
-rw-r--r--src/gallium/drivers/v3d/v3d_screen.h2
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.h2
-rw-r--r--src/gallium/include/pipe/p_video_state.h4
-rw-r--r--src/gallium/state_trackers/nine/device9.h8
-rw-r--r--src/gallium/state_trackers/nine/iunknown.h2
-rw-r--r--src/gallium/state_trackers/nine/resource9.h2
-rw-r--r--src/gallium/state_trackers/nine/volume9.h2
-rw-r--r--src/gallium/state_trackers/omx/vid_dec_common.h2
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c2
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h2
-rw-r--r--src/gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c2
-rw-r--r--src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c2
-rw-r--r--src/gallium/winsys/lima/drm/lima_drm_winsys.c2
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c2
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c2
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.h6
-rw-r--r--src/gallium/winsys/svga/drm/vmw_context.c2
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen.c2
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c2
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.h6
29 files changed, 74 insertions, 281 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.c b/src/gallium/auxiliary/pipebuffer/pb_validate.c
index 459dde526c3..df334693c01 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_validate.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_validate.c
@@ -65,7 +65,7 @@ enum pipe_error
pb_validate_add_buffer(struct pb_validate *vl,
struct pb_buffer *buf,
enum pb_usage_flags flags,
- struct util_hash_table *ht,
+ struct hash_table *ht,
boolean *already_present)
{
assert(buf);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.h b/src/gallium/auxiliary/pipebuffer/pb_validate.h
index 3196d5290fe..cb453a673d1 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_validate.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_validate.h
@@ -46,7 +46,7 @@ extern "C" {
struct pb_buffer;
struct pipe_fence_handle;
-struct util_hash_table;
+struct hash_table;
/**
@@ -61,7 +61,7 @@ enum pipe_error
pb_validate_add_buffer(struct pb_validate *vl,
struct pb_buffer *buf,
enum pb_usage_flags flags,
- struct util_hash_table *ht,
+ struct hash_table *ht,
boolean *already_present);
enum pipe_error
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c
index ef1b0557b8b..f525d6a5d30 100644
--- a/src/gallium/auxiliary/util/u_debug_flush.c
+++ b/src/gallium/auxiliary/util/u_debug_flush.c
@@ -82,7 +82,7 @@ struct debug_flush_ctx {
/* Contexts are used by a single thread at a time */
unsigned bt_depth;
boolean catch_map_of_referenced;
- struct util_hash_table *ref_hash;
+ struct hash_table *ref_hash;
struct list_head head;
};
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c
index c1560fb7dc0..a4612a40f66 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.c
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.c
@@ -54,7 +54,7 @@ static FILE *stream;
*/
static mtx_t serials_mutex = _MTX_INITIALIZER_NP;
-static struct util_hash_table *serials_hash;
+static struct hash_table *serials_hash;
static unsigned serials_last;
diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c
index 585fdcee8bc..34d493b4cee 100644
--- a/src/gallium/auxiliary/util/u_debug_stack.c
+++ b/src/gallium/auxiliary/util/u_debug_stack.c
@@ -46,7 +46,7 @@
#include "os/os_thread.h"
#include "u_hash_table.h"
-struct util_hash_table* symbols_hash;
+struct hash_table* symbols_hash;
static mtx_t symbols_mutex = _MTX_INITIALIZER_NP;
/* TODO with some refactoring we might be able to re-use debug_symbol_name_cached()
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index 20581c9c4d3..a1d4a5f23ae 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -270,7 +270,7 @@ debug_symbol_print(const void *addr)
debug_printf("\t%s\n", buf);
}
-struct util_hash_table* symbols_hash;
+struct hash_table* symbols_hash;
static mtx_t symbols_mutex = _MTX_INITIALIZER_NP;
const char*
diff --git a/src/gallium/auxiliary/util/u_hash_table.c b/src/gallium/auxiliary/util/u_hash_table.c
index 0db5ddbee5e..59c8c6cf98d 100644
--- a/src/gallium/auxiliary/util/u_hash_table.c
+++ b/src/gallium/auxiliary/util/u_hash_table.c
@@ -25,24 +25,10 @@
*
**************************************************************************/
-/**
- * @file
- * General purpose hash table implementation.
- *
- * Just uses the cso_hash for now, but it might be better switch to a linear
- * probing hash table implementation at some point -- as it is said they have
- * better lookup and cache performance and it appears to be possible to write
- * a lock-free implementation of such hash tables .
- *
- * @author José Fonseca <[email protected]>
- */
-
#include "pipe/p_compiler.h"
#include "util/u_debug.h"
-#include "cso_cache/cso_hash.h"
-
#include "util/u_memory.h"
#include "util/u_hash_table.h"
#include "util/hash_table.h"
@@ -52,50 +38,11 @@
#endif
-struct util_hash_table
-{
- struct cso_hash cso;
-
- /** Hash function */
- uint32_t (*hash)(const void *key);
-
- /** Compare two keys */
- bool (*equal)(const void *key1, const void *key2);
-
- /* TODO: key, value destructors? */
-};
-
-
-struct util_hash_table_item
-{
- void *key;
- void *value;
-};
-
-
-static inline struct util_hash_table_item *
-util_hash_table_item(struct cso_hash_iter iter)
-{
- return (struct util_hash_table_item *)cso_hash_iter_data(iter);
-}
-
-
-struct util_hash_table *
+struct hash_table *
util_hash_table_create(uint32_t (*hash)(const void *key),
bool (*equal)(const void *key1, const void *key2))
{
- struct util_hash_table *ht;
-
- ht = MALLOC_STRUCT(util_hash_table);
- if (!ht)
- return NULL;
-
- cso_hash_init(&ht->cso);
-
- ht->hash = hash;
- ht->equal = equal;
-
- return ht;
+ return _mesa_hash_table_create(NULL, hash, equal);
}
@@ -113,10 +60,10 @@ pointer_equal(const void *a, const void *b)
}
-struct util_hash_table *
+struct hash_table *
util_hash_table_create_ptr_keys(void)
{
- return util_hash_table_create(pointer_hash, pointer_equal);
+ return _mesa_hash_table_create(NULL, pointer_hash, pointer_equal);
}
@@ -154,220 +101,72 @@ static bool equal_fd(const void *key1, const void *key2)
}
-struct util_hash_table *
+struct hash_table *
util_hash_table_create_fd_keys(void)
{
- return util_hash_table_create(hash_fd, equal_fd);
-}
-
-
-static inline struct cso_hash_iter
-util_hash_table_find_iter(struct util_hash_table *ht,
- void *key,
- unsigned key_hash)
-{
- struct cso_hash_iter iter;
- struct util_hash_table_item *item;
-
- iter = cso_hash_find(&ht->cso, key_hash);
- while (!cso_hash_iter_is_null(iter)) {
- item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
- if (ht->equal(item->key, key))
- break;
- iter = cso_hash_iter_next(iter);
- }
-
- return iter;
-}
-
-
-static inline struct util_hash_table_item *
-util_hash_table_find_item(struct util_hash_table *ht,
- void *key,
- unsigned key_hash)
-{
- struct cso_hash_iter iter;
- struct util_hash_table_item *item;
-
- iter = cso_hash_find(&ht->cso, key_hash);
- while (!cso_hash_iter_is_null(iter)) {
- item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
- if (ht->equal(item->key, key))
- return item;
- iter = cso_hash_iter_next(iter);
- }
-
- return NULL;
+ return _mesa_hash_table_create(NULL, hash_fd, equal_fd);
}
enum pipe_error
-util_hash_table_set(struct util_hash_table *ht,
+util_hash_table_set(struct hash_table *ht,
void *key,
void *value)
{
- unsigned key_hash;
- struct util_hash_table_item *item;
- struct cso_hash_iter iter;
-
- assert(ht);
- if (!ht)
- return PIPE_ERROR_BAD_INPUT;
-
- key_hash = ht->hash(key);
-
- item = util_hash_table_find_item(ht, key, key_hash);
- if (item) {
- /* TODO: key/value destruction? */
- item->value = value;
- return PIPE_OK;
- }
-
- item = MALLOC_STRUCT(util_hash_table_item);
- if (!item)
- return PIPE_ERROR_OUT_OF_MEMORY;
-
- item->key = key;
- item->value = value;
-
- iter = cso_hash_insert(&ht->cso, key_hash, item);
- if(cso_hash_iter_is_null(iter)) {
- FREE(item);
- return PIPE_ERROR_OUT_OF_MEMORY;
- }
-
+ _mesa_hash_table_insert(ht, key, value);
return PIPE_OK;
}
void *
-util_hash_table_get(struct util_hash_table *ht,
+util_hash_table_get(struct hash_table *ht,
void *key)
{
- unsigned key_hash;
- struct util_hash_table_item *item;
-
- assert(ht);
- if (!ht)
- return NULL;
-
- key_hash = ht->hash(key);
+ struct hash_entry *entry = _mesa_hash_table_search(ht, key);
- item = util_hash_table_find_item(ht, key, key_hash);
- if (!item)
- return NULL;
-
- return item->value;
+ return entry ? entry->data : NULL;
}
void
-util_hash_table_remove(struct util_hash_table *ht,
+util_hash_table_remove(struct hash_table *ht,
void *key)
{
- unsigned key_hash;
- struct cso_hash_iter iter;
- struct util_hash_table_item *item;
-
- assert(ht);
- if (!ht)
- return;
-
- key_hash = ht->hash(key);
-
- iter = util_hash_table_find_iter(ht, key, key_hash);
- if(cso_hash_iter_is_null(iter))
- return;
-
- item = util_hash_table_item(iter);
- assert(item);
- FREE(item);
-
- cso_hash_erase(&ht->cso, iter);
+ _mesa_hash_table_remove_key(ht, key);
}
void
-util_hash_table_clear(struct util_hash_table *ht)
+util_hash_table_clear(struct hash_table *ht)
{
- struct cso_hash_iter iter;
- struct util_hash_table_item *item;
-
- assert(ht);
- if (!ht)
- return;
-
- iter = cso_hash_first_node(&ht->cso);
- while (!cso_hash_iter_is_null(iter)) {
- item = (struct util_hash_table_item *)cso_hash_take(&ht->cso, cso_hash_iter_key(iter));
- FREE(item);
- iter = cso_hash_first_node(&ht->cso);
- }
+ _mesa_hash_table_clear(ht, NULL);
}
enum pipe_error
-util_hash_table_foreach(struct util_hash_table *ht,
- enum pipe_error (*callback)
+util_hash_table_foreach(struct hash_table *ht,
+ enum pipe_error (*callback)
(void *key, void *value, void *data),
- void *data)
+ void *data)
{
- struct cso_hash_iter iter;
- struct util_hash_table_item *item;
- enum pipe_error result;
-
- assert(ht);
- if (!ht)
- return PIPE_ERROR_BAD_INPUT;
-
- iter = cso_hash_first_node(&ht->cso);
- while (!cso_hash_iter_is_null(iter)) {
- item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
- result = callback(item->key, item->value, data);
- if(result != PIPE_OK)
- return result;
- iter = cso_hash_iter_next(iter);
+ hash_table_foreach(ht, entry) {
+ enum pipe_error error = callback((void*)entry->key, entry->data, data);
+ if (error != PIPE_OK)
+ return error;
}
-
- return PIPE_OK;
-}
-
-
-static enum pipe_error
-util_hash_inc(UNUSED void *k, UNUSED void *v, void *d)
-{
- ++*(size_t *)d;
return PIPE_OK;
}
size_t
-util_hash_table_count(struct util_hash_table *ht)
+util_hash_table_count(struct hash_table *ht)
{
- size_t count = 0;
- util_hash_table_foreach(ht, util_hash_inc, &count);
- return count;
+ return _mesa_hash_table_num_entries(ht);
}
void
-util_hash_table_destroy(struct util_hash_table *ht)
+util_hash_table_destroy(struct hash_table *ht)
{
- struct cso_hash_iter iter;
- struct util_hash_table_item *item;
-
- assert(ht);
- if (!ht)
- return;
-
- iter = cso_hash_first_node(&ht->cso);
- while (!cso_hash_iter_is_null(iter)) {
- item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
- FREE(item);
- iter = cso_hash_iter_next(iter);
- }
-
- cso_hash_deinit(&ht->cso);
-
- FREE(ht);
+ _mesa_hash_table_destroy(ht, NULL);
}
diff --git a/src/gallium/auxiliary/util/u_hash_table.h b/src/gallium/auxiliary/util/u_hash_table.h
index 3d751f423aa..46470bf0647 100644
--- a/src/gallium/auxiliary/util/u_hash_table.h
+++ b/src/gallium/auxiliary/util/u_hash_table.h
@@ -27,8 +27,6 @@
/**
* General purpose hash table.
- *
- * @author José Fonseca <[email protected]>
*/
#ifndef U_HASH_TABLE_H_
@@ -42,11 +40,7 @@
extern "C" {
#endif
-
-/**
- * Generic purpose hash table.
- */
-struct util_hash_table;
+struct hash_table;
/**
@@ -55,56 +49,56 @@ struct util_hash_table;
* @param hash hash function
* @param equal should return true for two equal keys.
*/
-struct util_hash_table *
+struct hash_table *
util_hash_table_create(uint32_t (*hash)(const void *key),
bool (*equal)(const void *key1, const void *key2));
/**
* Create a hash table where the keys are generic pointers.
*/
-struct util_hash_table *
+struct hash_table *
util_hash_table_create_ptr_keys(void);
/**
* Create a hash table where the keys are device FDs.
*/
-struct util_hash_table *
+struct hash_table *
util_hash_table_create_fd_keys(void);
enum pipe_error
-util_hash_table_set(struct util_hash_table *ht,
+util_hash_table_set(struct hash_table *ht,
void *key,
void *value);
void *
-util_hash_table_get(struct util_hash_table *ht,
+util_hash_table_get(struct hash_table *ht,
void *key);
void
-util_hash_table_remove(struct util_hash_table *ht,
+util_hash_table_remove(struct hash_table *ht,
void *key);
void
-util_hash_table_clear(struct util_hash_table *ht);
+util_hash_table_clear(struct hash_table *ht);
enum pipe_error
-util_hash_table_foreach(struct util_hash_table *ht,
+util_hash_table_foreach(struct hash_table *ht,
enum pipe_error (*callback)
(void *key, void *value, void *data),
void *data);
size_t
-util_hash_table_count(struct util_hash_table *ht);
+util_hash_table_count(struct hash_table *ht);
void
-util_hash_table_destroy(struct util_hash_table *ht);
+util_hash_table_destroy(struct hash_table *ht);
#ifdef __cplusplus
diff --git a/src/gallium/drivers/lima/lima_screen.h b/src/gallium/drivers/lima/lima_screen.h
index 55286940030..f92a4385737 100644
--- a/src/gallium/drivers/lima/lima_screen.h
+++ b/src/gallium/drivers/lima/lima_screen.h
@@ -71,8 +71,8 @@ struct lima_screen {
/* bo table */
mtx_t bo_table_lock;
mtx_t bo_cache_lock;
- struct util_hash_table *bo_handles;
- struct util_hash_table *bo_flink_names;
+ struct hash_table *bo_handles;
+ struct hash_table *bo_flink_names;
struct list_head bo_cache_buckets[NR_BO_CACHE_BUCKETS];
struct list_head bo_cache_time;
diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h
index db2138d20be..f9ff26f18f8 100644
--- a/src/gallium/drivers/v3d/v3d_screen.h
+++ b/src/gallium/drivers/v3d/v3d_screen.h
@@ -71,7 +71,7 @@ struct v3d_screen {
const struct v3d_compiler *compiler;
- struct util_hash_table *bo_handles;
+ struct hash_table *bo_handles;
mtx_t bo_handles_mutex;
uint32_t bo_size;
diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h
index f4550d1c286..fa4becd8a3c 100644
--- a/src/gallium/drivers/vc4/vc4_screen.h
+++ b/src/gallium/drivers/vc4/vc4_screen.h
@@ -87,7 +87,7 @@ struct vc4_screen {
uint32_t bo_count;
} bo_cache;
- struct util_hash_table *bo_handles;
+ struct hash_table *bo_handles;
mtx_t bo_handles_mutex;
uint32_t bo_size;
diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index 1369f1a8ca6..2ace9477335 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -431,7 +431,7 @@ struct pipe_h264_enc_picture_desc
bool not_referenced;
bool enable_vui;
- struct util_hash_table *frame_idx;
+ struct hash_table *frame_idx;
};
@@ -513,7 +513,7 @@ struct pipe_h265_enc_picture_desc
unsigned ref_idx_l0;
unsigned ref_idx_l1;
bool not_referenced;
- struct util_hash_table *frame_idx;
+ struct hash_table *frame_idx;
};
struct pipe_h265_sps
diff --git a/src/gallium/state_trackers/nine/device9.h b/src/gallium/state_trackers/nine/device9.h
index 167a830d824..f24d79295ad 100644
--- a/src/gallium/state_trackers/nine/device9.h
+++ b/src/gallium/state_trackers/nine/device9.h
@@ -32,7 +32,7 @@
#include "nine_state.h"
struct gen_mipmap_state;
-struct util_hash_table;
+struct hash_table;
struct pipe_screen;
struct pipe_context;
struct cso_context;
@@ -102,8 +102,8 @@ struct NineDevice9
struct gen_mipmap_state *gen_mipmap;
struct {
- struct util_hash_table *ht_vs;
- struct util_hash_table *ht_ps;
+ struct hash_table *ht_vs;
+ struct hash_table *ht_ps;
struct NineVertexShader9 *vs;
struct NinePixelShader9 *ps;
unsigned num_vs;
@@ -111,7 +111,7 @@ struct NineDevice9
float *vs_const;
float *ps_const;
- struct util_hash_table *ht_fvf;
+ struct hash_table *ht_fvf;
} ff;
struct {
diff --git a/src/gallium/state_trackers/nine/iunknown.h b/src/gallium/state_trackers/nine/iunknown.h
index 2f7582ae477..20ad191cf44 100644
--- a/src/gallium/state_trackers/nine/iunknown.h
+++ b/src/gallium/state_trackers/nine/iunknown.h
@@ -60,7 +60,7 @@ struct NineUnknown
const GUID **guids; /* for QueryInterface */
/* for [GS]etPrivateData/FreePrivateData */
- struct util_hash_table *pdata;
+ struct hash_table *pdata;
void (*dtor)(void *data); /* top-level dtor */
};
diff --git a/src/gallium/state_trackers/nine/resource9.h b/src/gallium/state_trackers/nine/resource9.h
index f6310f158e8..9fed45476fb 100644
--- a/src/gallium/state_trackers/nine/resource9.h
+++ b/src/gallium/state_trackers/nine/resource9.h
@@ -27,7 +27,7 @@
#include "pipe/p_state.h"
struct pipe_screen;
-struct util_hash_table;
+struct hash_table;
struct NineDevice9;
struct NineResource9
diff --git a/src/gallium/state_trackers/nine/volume9.h b/src/gallium/state_trackers/nine/volume9.h
index f438642f567..77060f22112 100644
--- a/src/gallium/state_trackers/nine/volume9.h
+++ b/src/gallium/state_trackers/nine/volume9.h
@@ -28,7 +28,7 @@
#include "pipe/p_state.h"
#include "util/u_inlines.h"
-struct util_hash_table;
+struct hash_table;
struct NineDevice9;
diff --git a/src/gallium/state_trackers/omx/vid_dec_common.h b/src/gallium/state_trackers/omx/vid_dec_common.h
index bb104d05aef..26091e3e6f9 100644
--- a/src/gallium/state_trackers/omx/vid_dec_common.h
+++ b/src/gallium/state_trackers/omx/vid_dec_common.h
@@ -155,7 +155,7 @@ struct h264d_prc
struct pipe_video_codec *codec;
struct pipe_video_buffer *target;
enum pipe_video_profile profile;
- struct util_hash_table *video_buffer_map;
+ struct hash_table *video_buffer_map;
union {
struct {
unsigned nal_ref_idc;
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index 0b28d0a4269..f770daafa16 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -48,7 +48,7 @@
#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E
#endif
-static struct util_hash_table *dev_tab = NULL;
+static struct hash_table *dev_tab = NULL;
static simple_mtx_t dev_tab_mutex = _SIMPLE_MTX_INITIALIZER_NP;
DEBUG_GET_ONCE_BOOL_OPTION(all_bos, "RADEON_ALL_BOS", false)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
index a22be6086dc..7e677b517ff 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
@@ -99,7 +99,7 @@ struct amdgpu_winsys {
/* For returning the same amdgpu_winsys_bo instance for exported
* and re-imported buffers. */
- struct util_hash_table *bo_export_table;
+ struct hash_table *bo_export_table;
simple_mtx_t bo_export_table_lock;
};
diff --git a/src/gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c b/src/gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c
index bfeeb429be5..1d3f6dc817b 100644
--- a/src/gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c
+++ b/src/gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c
@@ -67,7 +67,7 @@ screen_create(struct renderonly *ro)
return etna_screen_create(dev, gpu, ro);
}
-static struct util_hash_table *etna_tab = NULL;
+static struct hash_table *etna_tab = NULL;
static mtx_t etna_screen_mutex = _MTX_INITIALIZER_NP;
diff --git a/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c b/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
index d09208bcb26..c0da444785f 100644
--- a/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
+++ b/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
@@ -38,7 +38,7 @@
#include "freedreno/freedreno_screen.h"
-static struct util_hash_table *fd_tab = NULL;
+static struct hash_table *fd_tab = NULL;
static mtx_t fd_screen_mutex = _MTX_INITIALIZER_NP;
diff --git a/src/gallium/winsys/lima/drm/lima_drm_winsys.c b/src/gallium/winsys/lima/drm/lima_drm_winsys.c
index c9ef9406598..6dcd21c2e60 100644
--- a/src/gallium/winsys/lima/drm/lima_drm_winsys.c
+++ b/src/gallium/winsys/lima/drm/lima_drm_winsys.c
@@ -34,7 +34,7 @@
#include "lima/lima_screen.h"
-static struct util_hash_table *fd_tab = NULL;
+static struct hash_table *fd_tab = NULL;
static mtx_t lima_screen_mutex = _MTX_INITIALIZER_NP;
static void
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index 57f3702a3e0..8547219b689 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -17,7 +17,7 @@
#include <nvif/class.h>
#include <nvif/cl0080.h>
-static struct util_hash_table *fd_tab = NULL;
+static struct hash_table *fd_tab = NULL;
static mtx_t nouveau_screen_mutex = _MTX_INITIALIZER_NP;
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index c38d238bfcd..394ba1f9831 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -41,7 +41,7 @@
#include <fcntl.h>
#include <radeon_surface.h>
-static struct util_hash_table *fd_tab = NULL;
+static struct hash_table *fd_tab = NULL;
static mtx_t fd_tab_mutex = _MTX_INITIALIZER_NP;
/* Enable/disable feature access for one command stream.
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
index 3ebe1d7708c..e23a963f37c 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
@@ -77,11 +77,11 @@ struct radeon_drm_winsys {
uint32_t accel_working2;
/* List of buffer GEM names. Protected by bo_handles_mutex. */
- struct util_hash_table *bo_names;
+ struct hash_table *bo_names;
/* List of buffer handles. Protectded by bo_handles_mutex. */
- struct util_hash_table *bo_handles;
+ struct hash_table *bo_handles;
/* List of buffer virtual memory ranges. Protectded by bo_handles_mutex. */
- struct util_hash_table *bo_vas;
+ struct hash_table *bo_vas;
mtx_t bo_handles_mutex;
mtx_t bo_fence_lock;
diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c
index 2950d719629..bc6883ee08c 100644
--- a/src/gallium/winsys/svga/drm/vmw_context.c
+++ b/src/gallium/winsys/svga/drm/vmw_context.c
@@ -95,7 +95,7 @@ struct vmw_svga_winsys_context
struct svga_winsys_context base;
struct vmw_winsys_screen *vws;
- struct util_hash_table *hash;
+ struct hash_table *hash;
#ifdef DEBUG
boolean must_flush;
diff --git a/src/gallium/winsys/svga/drm/vmw_screen.c b/src/gallium/winsys/svga/drm/vmw_screen.c
index 5f68a894673..cecb932c4c7 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen.c
@@ -41,7 +41,7 @@
#include <unistd.h>
#include <fcntl.h>
-static struct util_hash_table *dev_hash = NULL;
+static struct hash_table *dev_hash = NULL;
static bool vmw_dev_compare(const void *key1, const void *key2)
{
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 959af78493b..4d9aa0332f8 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -1004,7 +1004,7 @@ virgl_drm_winsys_create(int drmFD)
}
-static struct util_hash_table *fd_tab = NULL;
+static struct hash_table *fd_tab = NULL;
static mtx_t virgl_screen_mutex = _MTX_INITIALIZER_NP;
static void
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
index 3a2c476a00b..f3cb7f2fd07 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
@@ -32,7 +32,7 @@
#include "virgl_resource_cache.h"
struct pipe_fence_handle;
-struct util_hash_table;
+struct hash_table;
struct virgl_hw_res {
struct pipe_reference reference;
@@ -60,8 +60,8 @@ struct virgl_drm_winsys
struct virgl_resource_cache cache;
mtx_t mutex;
- struct util_hash_table *bo_handles;
- struct util_hash_table *bo_names;
+ struct hash_table *bo_handles;
+ struct hash_table *bo_names;
mtx_t bo_handles_mutex;
bool has_capset_query_fix;
};