diff options
author | Daniel Schürmann <daniel@schuermann.dev> | 2023-03-19 23:56:07 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-04-10 09:14:30 +0000 |
commit | 53eb3ad375bc9147d0ff3a2e584fe7d4d8887b62 (patch) | |
tree | 7abd11da6d9d4a569b5bea2a0838ac185ee2faf9 /src/vulkan | |
parent | a6360a3203189b4d0e2d1169c5978796afe6d040 (diff) | |
download | mesa-53eb3ad375bc9147d0ff3a2e584fe7d4d8887b62.tar.gz mesa-53eb3ad375bc9147d0ff3a2e584fe7d4d8887b62.tar.bz2 mesa-53eb3ad375bc9147d0ff3a2e584fe7d4d8887b62.zip |
vulkan/pipeline_cache: add cache parameter to deserialize() function
This allows for secondary cache lookups during deserialization.
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 | ||||
-rw-r--r-- | src/vulkan/runtime/vk_pipeline_cache.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index 11398b5d4bf..0eb36c0392d 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -62,7 +62,7 @@ raw_data_object_serialize(struct vk_pipeline_cache_object *object, } static struct vk_pipeline_cache_object * -raw_data_object_deserialize(struct vk_device *device, +raw_data_object_deserialize(struct vk_pipeline_cache *cache, const void *key_data, size_t key_size, struct blob_reader *blob) @@ -77,7 +77,8 @@ raw_data_object_deserialize(struct vk_device *device, const void *data = blob_read_bytes(blob, data_size); struct raw_data_object *data_obj = - raw_data_object_create(device, key_data, key_size, data, data_size); + raw_data_object_create(cache->base.device, key_data, key_size, data, + data_size); return data_obj ? &data_obj->base : NULL; } @@ -285,7 +286,7 @@ vk_pipeline_cache_object_deserialize(struct vk_pipeline_cache *cache, blob_reader_init(&reader, data, data_size); struct vk_pipeline_cache_object *object = - ops->deserialize(cache->base.device, key_data, key_size, &reader); + ops->deserialize(cache, key_data, key_size, &reader); if (object == NULL) { vk_logw(VK_LOG_OBJS(cache), diff --git a/src/vulkan/runtime/vk_pipeline_cache.h b/src/vulkan/runtime/vk_pipeline_cache.h index 99e2b1d186a..81734de379e 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.h +++ b/src/vulkan/runtime/vk_pipeline_cache.h @@ -77,7 +77,7 @@ struct vk_pipeline_cache_object_ops { * * This function is optional. */ - struct vk_pipeline_cache_object *(*deserialize)(struct vk_device *device, + struct vk_pipeline_cache_object *(*deserialize)(struct vk_pipeline_cache *cache, const void *key_data, size_t key_size, struct blob_reader *blob); |