swr/rast: Remove unneeded copy of gather mask
[mesa.git] / src / util / disk_cache.c
index fde6e2e09742579a2a106a9c61a9cb75b95be48c..7ebfa8c045c8da128166a1b22d64763d12e664f3 100644 (file)
@@ -811,7 +811,6 @@ create_put_job(struct disk_cache *cache, const cache_key key,
    return dc_job;
 
 fail:
-   free(dc_job->cache_item_metadata.keys);
    free(dc_job);
 
    return NULL;
@@ -1170,7 +1169,7 @@ void
 disk_cache_put_key(struct disk_cache *cache, const cache_key key)
 {
    const uint32_t *key_chunk = (const uint32_t *) key;
-   int i = *key_chunk & CACHE_INDEX_KEY_MASK;
+   int i = CPU_TO_LE32(*key_chunk) & CACHE_INDEX_KEY_MASK;
    unsigned char *entry;
 
    entry = &cache->stored_keys[i * CACHE_KEY_SIZE];
@@ -1189,7 +1188,7 @@ bool
 disk_cache_has_key(struct disk_cache *cache, const cache_key key)
 {
    const uint32_t *key_chunk = (const uint32_t *) key;
-   int i = *key_chunk & CACHE_INDEX_KEY_MASK;
+   int i = CPU_TO_LE32(*key_chunk) & CACHE_INDEX_KEY_MASK;
    unsigned char *entry;
 
    entry = &cache->stored_keys[i * CACHE_KEY_SIZE];