radv: allow to build the pre-rasterization stages in a library
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18672>
This commit is contained in:

committed by
Marge Bot

parent
456543e6d8
commit
efd83e9627
@@ -6353,22 +6353,15 @@ radv_graphics_lib_pipeline_init(struct radv_graphics_lib_pipeline *pipeline,
|
|||||||
key.ps.has_epilog = true;
|
key.ps.has_epilog = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Force the driver to retain the NIR shaders (after SPIRV->NIR) because it doesn't yet
|
/* Compile the pre-rasterization stages only when the vertex input interface is missing. */
|
||||||
* support pre-rasterization stages. This is very suboptimal, slow but good enough for a
|
if ((imported_flags & VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT) &&
|
||||||
* start.
|
!(imported_flags & VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT)) {
|
||||||
*/
|
key.vs.has_prolog = true;
|
||||||
VkPipelineCreateFlags flags = pCreateInfo->flags;
|
|
||||||
if (pipeline->base.active_stages & (VK_SHADER_STAGE_VERTEX_BIT |
|
|
||||||
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT |
|
|
||||||
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT |
|
|
||||||
VK_SHADER_STAGE_GEOMETRY_BIT |
|
|
||||||
VK_SHADER_STAGE_MESH_BIT_NV)) {
|
|
||||||
flags |= VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = radv_create_shaders(&pipeline->base.base, pipeline_layout, device, cache, &key,
|
result = radv_create_shaders(&pipeline->base.base, pipeline_layout, device, cache, &key,
|
||||||
pCreateInfo->pStages, pCreateInfo->stageCount, flags, NULL,
|
pCreateInfo->pStages, pCreateInfo->stageCount, pCreateInfo->flags,
|
||||||
creation_feedback, NULL, NULL,
|
NULL, creation_feedback, NULL, NULL,
|
||||||
&pipeline->base.last_vgt_api_stage);
|
&pipeline->base.last_vgt_api_stage);
|
||||||
if (result != VK_SUCCESS && result != VK_PIPELINE_COMPILE_REQUIRED)
|
if (result != VK_SUCCESS && result != VK_PIPELINE_COMPILE_REQUIRED)
|
||||||
goto fail_shaders;
|
goto fail_shaders;
|
||||||
|
Reference in New Issue
Block a user