aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache/cso_hash.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2008-09-24 20:42:57 +0100
committerAlan Hourihane <[email protected]>2008-09-24 20:43:56 +0100
commit4fe186f8dc4fc7eeab3b1069c886458cfc2e517c (patch)
tree411b5700426f51db2009a8e4afdb8412db7a1b4b /src/gallium/auxiliary/cso_cache/cso_hash.c
parent2a7dc7927339322fbffaba62d2fb69373b94caf0 (diff)
add cso_hash_contains() function
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_hash.c')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_hash.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c
index 7f0044c5a7f..4e7664f9bf0 100644
--- a/src/gallium/auxiliary/cso_cache/cso_hash.c
+++ b/src/gallium/auxiliary/cso_cache/cso_hash.c
@@ -431,3 +431,9 @@ struct cso_hash_iter cso_hash_erase(struct cso_hash *hash, struct cso_hash_iter
--hash->data.d->size;
return ret;
}
+
+boolean cso_hash_contains(struct cso_hash *hash, unsigned key)
+{
+ struct cso_node **node = cso_hash_find_node(hash, key);
+ return (*node != hash->data.e);
+}