vulkan: Fall back to raw data objects when deserializing if ops == NULL
This can happen if an object is serialized whose object type isn't in
the pipeline cache import ops. In this case, we generate a raw data
object and plan to turn it into the right object type later.
Fixes: d35e78bb85 ("vulkan/pipeline_cache: Implement deserialize for raw objects")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16584>
This commit is contained in:
committed by
Marge Bot
parent
1e710f7a2c
commit
8b13ee75ba
@@ -271,6 +271,9 @@ vk_pipeline_cache_object_deserialize(struct vk_pipeline_cache *cache,
|
||||
const void *data, size_t data_size,
|
||||
const struct vk_pipeline_cache_object_ops *ops)
|
||||
{
|
||||
if (ops == NULL)
|
||||
ops = &raw_data_object_ops;
|
||||
|
||||
if (unlikely(ops->deserialize == NULL)) {
|
||||
vk_logw(VK_LOG_OBJS(cache),
|
||||
"Pipeline cache object cannot be deserialized");
|
||||
|
||||
Reference in New Issue
Block a user