mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 22:10:21 +01:00
mesa: remove unused _mesa_HashTable code
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
This commit is contained in:
parent
716e483cfb
commit
70b65fe09b
4 changed files with 0 additions and 82 deletions
|
|
@ -1083,21 +1083,6 @@ count_buffer_size(void *data, void *userData)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compute total size (in bytes) of all buffer objects for the given context.
|
||||
* For debugging purposes.
|
||||
*/
|
||||
GLuint
|
||||
_mesa_total_buffer_object_memory(struct gl_context *ctx)
|
||||
{
|
||||
GLuint total = 0;
|
||||
|
||||
_mesa_HashWalkMaybeLocked(ctx->Shared->BufferObjects, count_buffer_size,
|
||||
&total, ctx->BufferObjectsLocked);
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the state associated with buffer objects
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -235,9 +235,6 @@ _mesa_reference_buffer_object_shared(struct gl_context *ctx,
|
|||
_mesa_reference_buffer_object_(ctx, ptr, bufObj, true);
|
||||
}
|
||||
|
||||
extern GLuint
|
||||
_mesa_total_buffer_object_memory(struct gl_context *ctx);
|
||||
|
||||
extern void
|
||||
_mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
|
||||
GLenum target, GLsizeiptr size, const GLvoid *data,
|
||||
|
|
|
|||
|
|
@ -383,24 +383,6 @@ _mesa_HashWalkLocked(const struct _mesa_HashTable *table,
|
|||
hash_walk_unlocked(table, callback, userData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump contents of hash table for debugging.
|
||||
*
|
||||
* \param table the hash table.
|
||||
*/
|
||||
void
|
||||
_mesa_HashPrint(const struct _mesa_HashTable *table)
|
||||
{
|
||||
if (table->deleted_key_data)
|
||||
_mesa_debug(NULL, "%u %p\n", DELETED_KEY_VALUE, table->deleted_key_data);
|
||||
|
||||
hash_table_foreach(table->ht, entry) {
|
||||
_mesa_debug(NULL, "%u %p\n", (unsigned)(uintptr_t) entry->key,
|
||||
entry->data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find a block of adjacent unused hash keys.
|
||||
*
|
||||
|
|
@ -466,20 +448,3 @@ _mesa_HashFindFreeKeys(struct _mesa_HashTable *table, GLuint* keys, GLuint numKe
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the number of entries in the hash table.
|
||||
*/
|
||||
GLuint
|
||||
_mesa_HashNumEntries(const struct _mesa_HashTable *table)
|
||||
{
|
||||
GLuint count = 0;
|
||||
|
||||
if (table->deleted_key_data)
|
||||
count++;
|
||||
|
||||
count += _mesa_hash_table_num_entries(table->ht);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,31 +177,13 @@ _mesa_HashWalkLocked(const struct _mesa_HashTable *table,
|
|||
void (*callback)(void *data, void *userData),
|
||||
void *userData);
|
||||
|
||||
extern void _mesa_HashPrint(const struct _mesa_HashTable *table);
|
||||
|
||||
extern GLuint _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys);
|
||||
|
||||
extern bool
|
||||
_mesa_HashFindFreeKeys(struct _mesa_HashTable *table, GLuint* keys, GLuint numKeys);
|
||||
|
||||
extern GLuint
|
||||
_mesa_HashNumEntries(const struct _mesa_HashTable *table);
|
||||
|
||||
extern void _mesa_test_hash_functions(void);
|
||||
|
||||
extern void _mesa_HashEnableNameReuse(struct _mesa_HashTable *table);
|
||||
|
||||
static inline void
|
||||
_mesa_HashWalkMaybeLocked(const struct _mesa_HashTable *table,
|
||||
void (*callback)(void *data, void *userData),
|
||||
void *userData, bool locked)
|
||||
{
|
||||
if (locked)
|
||||
_mesa_HashWalkLocked(table, callback, userData);
|
||||
else
|
||||
_mesa_HashWalk(table, callback, userData);
|
||||
}
|
||||
|
||||
static inline struct gl_buffer_object *
|
||||
_mesa_HashLookupMaybeLocked(struct _mesa_HashTable *table, GLuint key,
|
||||
bool locked)
|
||||
|
|
@ -212,17 +194,6 @@ _mesa_HashLookupMaybeLocked(struct _mesa_HashTable *table, GLuint key,
|
|||
return _mesa_HashLookup(table, key);
|
||||
}
|
||||
|
||||
static inline void
|
||||
_mesa_HashInsertMaybeLocked(struct _mesa_HashTable *table,
|
||||
GLuint key, void *data, GLboolean isGenName,
|
||||
bool locked)
|
||||
{
|
||||
if (locked)
|
||||
_mesa_HashInsertLocked(table, key, data, isGenName);
|
||||
else
|
||||
_mesa_HashInsert(table, key, data, isGenName);
|
||||
}
|
||||
|
||||
static inline void
|
||||
_mesa_HashLockMaybeLocked(struct _mesa_HashTable *table, bool locked)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue