diff options
author | Daniel Schürmann <daniel@schuermann.dev> | 2023-03-16 20:24:31 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-04-10 09:14:30 +0000 |
commit | a6360a3203189b4d0e2d1169c5978796afe6d040 (patch) | |
tree | 28c953f7766bbb7bb8d4a7c73d21a776768e4c42 /src/vulkan | |
parent | f524f91d6fabf77f46f92f4ae3fb5a5ac57b20d7 (diff) | |
download | mesa-a6360a3203189b4d0e2d1169c5978796afe6d040.tar.gz mesa-a6360a3203189b4d0e2d1169c5978796afe6d040.tar.bz2 mesa-a6360a3203189b4d0e2d1169c5978796afe6d040.zip |
vulkan/pipeline_cache: use vk_pipeline_cache_create_and_insert_object() during vk_pipeline_cache_load()
This avoids an extra serialize() step for disk-cache insertion.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/runtime/vk_pipeline_cache.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index 7e8c8c8c786..11398b5d4bf 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -593,13 +593,12 @@ vk_pipeline_cache_load(struct vk_pipeline_cache *cache, find_ops_for_type(cache->base.device->physical, type); struct vk_pipeline_cache_object *object = - vk_pipeline_cache_object_deserialize(cache, - key_data, key_size, - data, data_size, ops); + vk_pipeline_cache_create_and_insert_object(cache, key_data, key_size, + data, data_size, ops); + if (object == NULL) continue; - object = vk_pipeline_cache_add_object(cache, object); vk_pipeline_cache_object_unref(cache->base.device, object); } } |