radv: destroy the pipeline layout if creating a library failed
It should be properly cleaned. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18252>
This commit is contained in:

committed by
Marge Bot

parent
39bebff1ac
commit
0250925f07
@@ -6972,7 +6972,7 @@ radv_graphics_lib_pipeline_init(struct radv_graphics_lib_pipeline *pipeline,
|
|||||||
result = radv_pipeline_import_graphics_info(&pipeline->base, state, pipeline_layout, pCreateInfo,
|
result = radv_pipeline_import_graphics_info(&pipeline->base, state, pipeline_layout, pCreateInfo,
|
||||||
imported_flags);
|
imported_flags);
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS)
|
||||||
return result;
|
goto fail;
|
||||||
|
|
||||||
radv_pipeline_layout_hash(pipeline_layout);
|
radv_pipeline_layout_hash(pipeline_layout);
|
||||||
|
|
||||||
@@ -6997,11 +6997,15 @@ radv_graphics_lib_pipeline_init(struct radv_graphics_lib_pipeline *pipeline,
|
|||||||
pCreateInfo->pStages, pCreateInfo->stageCount, flags, NULL,
|
pCreateInfo->pStages, pCreateInfo->stageCount, flags, NULL,
|
||||||
creation_feedback, NULL, NULL,
|
creation_feedback, NULL, NULL,
|
||||||
&pipeline->base.last_vgt_api_stage);
|
&pipeline->base.last_vgt_api_stage);
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS && result != VK_PIPELINE_COMPILE_REQUIRED)
|
||||||
return result;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
radv_pipeline_layout_finish(device, pipeline_layout);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VkResult
|
static VkResult
|
||||||
|
Reference in New Issue
Block a user