From 4fe186f8dc4fc7eeab3b1069c886458cfc2e517c Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 24 Sep 2008 20:42:57 +0100 Subject: add cso_hash_contains() function --- src/gallium/auxiliary/cso_cache/cso_hash.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/auxiliary/cso_cache/cso_hash.c') 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); +} -- cgit v1.2.3