v3dv: handle allocation failure during pipeline initialization
Fixes (with disk cache disabled): dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic dEQP-VK.api.object_management.alloc_callback_fail.device dEQP-VK.api.object_management.alloc_callback_fail.device_group Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Eric Engestrom <eric@igalia.com> cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
This commit is contained in:
@@ -2411,6 +2411,8 @@ pipeline_compile_graphics(struct v3dv_pipeline *pipeline,
|
||||
*/
|
||||
pipeline->shared_data =
|
||||
v3dv_pipeline_shared_data_new_empty(pipeline->sha1, pipeline, true);
|
||||
if (!pipeline->shared_data)
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
struct v3dv_pipeline_stage *p_stage_vs = pipeline->stages[BROADCOM_SHADER_VERTEX];
|
||||
struct v3dv_pipeline_stage *p_stage_fs = pipeline->stages[BROADCOM_SHADER_FRAGMENT];
|
||||
@@ -3133,6 +3135,8 @@ pipeline_compile_compute(struct v3dv_pipeline *pipeline,
|
||||
pipeline->shared_data = v3dv_pipeline_shared_data_new_empty(pipeline->sha1,
|
||||
pipeline,
|
||||
false);
|
||||
if (!pipeline->shared_data)
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
p_stage->feedback.flags |= VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT;
|
||||
|
||||
|
Reference in New Issue
Block a user