mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
v3dv/pipeline_cache: adds check to skip searching for a entry
If we are calling pipeline_cache_upload_shared_data with from_disk_cache, that means that we had used the disk-cache to found that entry. And that should only happens if we didn't find the entry on the cache. So on that case we can skip to search for it. Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16313>
This commit is contained in:
parent
080e14ff61
commit
f57a01c5f9
1 changed files with 7 additions and 2 deletions
|
|
@ -427,8 +427,13 @@ pipeline_cache_upload_shared_data(struct v3dv_pipeline_cache *cache,
|
|||
return;
|
||||
|
||||
pipeline_cache_lock(cache);
|
||||
struct hash_entry *entry =
|
||||
_mesa_hash_table_search(cache->cache, shared_data->sha1_key);
|
||||
struct hash_entry *entry = NULL;
|
||||
|
||||
/* If this is being called from the disk cache, we already know that the
|
||||
* entry is not on the hash table
|
||||
*/
|
||||
if (!from_disk_cache)
|
||||
entry = _mesa_hash_table_search(cache->cache, shared_data->sha1_key);
|
||||
|
||||
if (entry) {
|
||||
pipeline_cache_unlock(cache);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue