On Tue, 2015-05-05 at 13:50 +0300, Juha-Pekka Heikkila wrote: > I didn't find this being used anywhere. >
It used to be used by KHR_debug but Chia-I Wu replaced the hash table with a list for a number of reasons this time last year. Reviewed-by: Timothy Arceri <t_arc...@yahoo.com.au> > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> > --- > src/mesa/main/hash.c | 28 ---------------------------- > src/mesa/main/hash.h | 3 --- > 2 files changed, 31 deletions(-) > > diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c > index d04cccd..315b5d6 100644 > --- a/src/mesa/main/hash.c > +++ b/src/mesa/main/hash.c > @@ -389,34 +389,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table, > > > /** > - * Clone all entries in a hash table, into a new table. > - * > - * \param table the hash table to clone > - */ > -struct _mesa_HashTable * > -_mesa_HashClone(const struct _mesa_HashTable *table) > -{ > - /* cast-away const */ > - struct _mesa_HashTable *table2 = (struct _mesa_HashTable *) table; > - struct hash_entry *entry; > - struct _mesa_HashTable *clonetable; > - > - assert(table); > - mtx_lock(&table2->Mutex); > - > - clonetable = _mesa_NewHashTable(); > - assert(clonetable); > - hash_table_foreach(table->ht, entry) { > - _mesa_HashInsert(clonetable, (GLint)(uintptr_t)entry->key, > entry->data); > - } > - > - mtx_unlock(&table2->Mutex); > - > - return clonetable; > -} > - > - > -/** > * Walk over all entries in a hash table, calling callback function for each. > * Note: we use a separate mutex in this function to avoid a recursive > * locking deadlock (in case the callback calls _mesa_HashRemove()) and to > diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h > index e3e8f49..da3b997 100644 > --- a/src/mesa/main/hash.h > +++ b/src/mesa/main/hash.h > @@ -59,9 +59,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table, > void (*callback)(GLuint key, void *data, void *userData), > void *userData); > > -extern struct _mesa_HashTable * > -_mesa_HashClone(const struct _mesa_HashTable *table); > - > extern void > _mesa_HashWalk(const struct _mesa_HashTable *table, > void (*callback)(GLuint key, void *data, void *userData), _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev