radv: fix returning VK_PIPELINE_COMPILE_REQUIRED from library
When VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED is set by the application, the driver should return VK_COMPILE_REQUIRED but this was broken for GPL (it returned VK_SUCCESS instead). Also, objects shouldn't be destroyed when creating the library failed because it's already handled in radv_graphics_lib_pipeline_create(). Cc: 22.3 mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7512 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20532>
This commit is contained in:

committed by
Marge Bot

parent
888f5e5aa1
commit
5757dbe1ee
@@ -5437,7 +5437,7 @@ radv_graphics_lib_pipeline_init(struct radv_graphics_lib_pipeline *pipeline,
|
||||
result = radv_pipeline_import_graphics_info(&pipeline->base, state, pipeline_layout, pCreateInfo,
|
||||
imported_flags);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_layout;
|
||||
return result;
|
||||
|
||||
radv_pipeline_layout_hash(pipeline_layout);
|
||||
|
||||
@@ -5450,7 +5450,7 @@ radv_graphics_lib_pipeline_init(struct radv_graphics_lib_pipeline *pipeline,
|
||||
|
||||
pipeline->base.ps_epilog = radv_create_ps_epilog(device, &key);
|
||||
if (!pipeline->base.ps_epilog)
|
||||
goto fail_layout;
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
|
||||
if (pipeline->base.active_stages != 0) {
|
||||
@@ -5476,18 +5476,12 @@ radv_graphics_lib_pipeline_init(struct radv_graphics_lib_pipeline *pipeline,
|
||||
pCreateInfo->pStages, pCreateInfo->stageCount, pCreateInfo->flags,
|
||||
NULL, creation_feedback, NULL, NULL,
|
||||
&pipeline->base.last_vgt_api_stage);
|
||||
if (result != VK_SUCCESS && result != VK_PIPELINE_COMPILE_REQUIRED)
|
||||
goto fail_shaders;
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
||||
fail_shaders:
|
||||
if (pipeline->base.ps_epilog)
|
||||
radv_shader_part_unref(device, pipeline->base.ps_epilog);
|
||||
fail_layout:
|
||||
radv_pipeline_layout_finish(device, pipeline_layout);
|
||||
return result;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
|
Reference in New Issue
Block a user