mesa: remove ARB_transpose_matrix extension enable flag
[mesa.git] / src / mesa / main / hash.c
index 72d924dcc38ef222a4c9bea6ace6b5e99217446a..61c369a80cdada0d2fc67562875942a5fd92e877 100644 (file)
@@ -123,7 +123,7 @@ _mesa_DeleteHashTable(struct _mesa_HashTable *table)
  * Lookup an entry in the hash table, without locking.
  * \sa _mesa_HashLookup
  */
-static INLINE void *
+static inline void *
 _mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key)
 {
    GLuint pos;
@@ -480,6 +480,26 @@ _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys)
 }
 
 
+/**
+ * Return the number of entries in the hash table.
+ */
+GLuint
+_mesa_HashNumEntries(const struct _mesa_HashTable *table)
+{
+   GLuint pos, count = 0;
+
+   for (pos = 0; pos < TABLE_SIZE; pos++) {
+      const struct HashEntry *entry;
+      for (entry = table->Table[pos]; entry; entry = entry->Next) {
+         count++;
+      }
+   }
+
+   return count;
+}
+
+
+
 #if 0 /* debug only */
 
 /**