aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-01-21 20:18:54 -0500
committerMarek Olšák <[email protected]>2020-02-14 18:16:28 -0500
commit789ed29d59b9c7c8cbef371311bfb3c507ae725a (patch)
tree158966bfb13bede2c2443f59d7f3ee819f393b0d /src/gallium/auxiliary/cso_cache
parenta8bbf1054093f638c83a27696b841d053a83ba72 (diff)
gallium/cso_hash: remove always constant variable nodeSize
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
Diffstat (limited to 'src/gallium/auxiliary/cso_cache')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_hash.c3
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_hash.h1
2 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c
index 753cd89f1ed..e3495d5165a 100644
--- a/src/gallium/auxiliary/cso_cache/cso_hash.c
+++ b/src/gallium/auxiliary/cso_cache/cso_hash.c
@@ -75,7 +75,7 @@ static int countBits(int hint)
static void *cso_data_allocate_node(struct cso_hash_data *hash)
{
- return MALLOC(hash->nodeSize);
+ return MALLOC(sizeof(struct cso_node));
}
static void cso_free_node(struct cso_node *node)
@@ -208,7 +208,6 @@ bool cso_hash_init(struct cso_hash *hash)
hash->data.d->fakeNext = 0;
hash->data.d->buckets = 0;
hash->data.d->size = 0;
- hash->data.d->nodeSize = sizeof(struct cso_node);
hash->data.d->userNumBits = (short)MinNumBits;
hash->data.d->numBits = 0;
hash->data.d->numBuckets = 0;
diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.h b/src/gallium/auxiliary/cso_cache/cso_hash.h
index b86e11c5fd5..182cef0a2af 100644
--- a/src/gallium/auxiliary/cso_cache/cso_hash.h
+++ b/src/gallium/auxiliary/cso_cache/cso_hash.h
@@ -73,7 +73,6 @@ struct cso_hash_data {
struct cso_node *fakeNext;
struct cso_node **buckets;
int size;
- int nodeSize;
short userNumBits;
short numBits;
int numBuckets;