vulkan: Fix pipeline libraries with dynamic-only VI or FSR state
authorJason Ekstrand <jason.ekstrand@collabora.com>
Wed, 20 Jul 2022 18:58:44 +0000 (13:58 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 22 Jul 2022 02:36:17 +0000 (02:36 +0000)
commitceccbc01f5f79b96f5d02b5a22330ecd2588d9e8
tree8b8d3181f5a4f618ce8ec58bf200a91f11208937
parente5e828e91d3a107d52be31d6a53f37c85108209c
vulkan: Fix pipeline libraries with dynamic-only VI or FSR state

When we initialize the graphics pipeline state, we skip VI and FSR state
if they're 100% dynamic.  We need to do this if the current set of
dynamic things contains VI/FSR or if the set of dynamic state already in
the vk_graphics_pipeline_state has them dynamic.  Look state->dynamic
after we've merged instead of just looking at the dynamic set from the
VkGraphicsPipelineCreateInfo we were passed.

Also, when we validate, we need to assume that VI and FSR exist or else
we'll assert if dynamic VI or FSR are set.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
src/vulkan/runtime/vk_graphics_state.c