vulkan/runtime: fix allocation failure handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 93d0c66b27
("vulkan/pipeline_cache: Add helpers for storing NIR in the cache")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31982>
This commit is contained in:

committed by
Marge Bot

parent
5375d77488
commit
2cadab5dcf
@@ -518,6 +518,10 @@ vk_pipeline_cache_add_nir(struct vk_pipeline_cache *cache,
|
||||
key_data, key_size,
|
||||
blob.data, blob.size);
|
||||
blob_finish(&blob);
|
||||
if (data_obj == NULL) {
|
||||
vk_pipeline_cache_log(cache, "Ran out of memory creating NIR shader");
|
||||
return;
|
||||
}
|
||||
|
||||
struct vk_pipeline_cache_object *cached =
|
||||
vk_pipeline_cache_add_object(cache, &data_obj->base);
|
||||
|
Reference in New Issue
Block a user