diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 0e6e4760658..a955df9e2b0 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -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 */ diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 197636ee018..d6db0c17f7c 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -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, diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index 6a27901e15c..b1aa4a7099b 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -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; -} diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h index 181528367bd..376528a7e65 100644 --- a/src/mesa/main/hash.h +++ b/src/mesa/main/hash.h @@ -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) {