venus: fix to respect the final pipeline layout

This fixes VUID-vkCmdDraw-None-08600 violation when running gpl cts:
dEQP-VK...graphics_library.misc.bind_null_descriptor_set.*, where the
final pipeline layout is falsely dropped, leading to incompatible with
the pipeline layout of the bound descriptor set.

Fixes: a65ac274ac ("venus: Do pipeline fixes for VK_EXT_graphics_pipeline_library")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
(cherry picked from commit 80a5df16fe81d39fd771d5805b141c4eff623886)
This commit is contained in:
Yiwei Zhang 2024-01-13 00:21:30 -08:00 committed by Eric Engestrom
parent 252a87e77c
commit bfa31de5fd
2 changed files with 14 additions and 1 deletions

View file

@ -84,7 +84,7 @@
"description": "venus: fix to respect the final pipeline layout",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "a65ac274acf250a8f4a5abb030c46b572c3552f4",
"notes": null

View file

@ -1221,6 +1221,19 @@ vn_graphics_pipeline_state_fill(
state->gpl.fragment_output = true;
}
/* After direct_gpl states collection, check the final state to validate
* VkPipelineLayout in case of being the final layout in linked pipeline.
*
* From the Vulkan 1.3.275 spec:
* VUID-VkGraphicsPipelineCreateInfo-layout-06602
*
* If the pipeline requires fragment shader state or pre-rasterization
* shader state, layout must be a valid VkPipelineLayout handle
*/
if ((state->gpl.fragment_shader && !is_raster_statically_disabled) ||
state->gpl.pre_raster_shaders)
valid.self.pipeline_layout = true;
/* Pipeline Derivatives
*
* VUID-VkGraphicsPipelineCreateInfo-flags-07984