mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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:
parent
5375d77488
commit
2cadab5dcf
1 changed files with 4 additions and 0 deletions
|
|
@ -518,6 +518,10 @@ vk_pipeline_cache_add_nir(struct vk_pipeline_cache *cache,
|
||||||
key_data, key_size,
|
key_data, key_size,
|
||||||
blob.data, blob.size);
|
blob.data, blob.size);
|
||||||
blob_finish(&blob);
|
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 =
|
struct vk_pipeline_cache_object *cached =
|
||||||
vk_pipeline_cache_add_object(cache, &data_obj->base);
|
vk_pipeline_cache_add_object(cache, &data_obj->base);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue