`VkDescriptorSetLayout` is not kept alive by `VkPipelineLayout`
A Vulkan specification break exists in multiple Mesa subprojects, drivers expect VkDescriptorSetLayout
to stay alive for the duration of VkPipelineLayout
's usage when this is not a guarantee provided by the specification thus any required lifetime guarantees must be ensured by driver code by maintaining a refcount or storing a copy in the pipeline layout.
Steps to reproduce (Tested on turnip
):
- Create a Descriptor Set Layout
- Create a Pipeline Layout from the Descriptor Set Layout
- Destroy the Descriptor Set Layout
- Use Pipeline Layout to create Graphics Pipeline — will result in UB
According to @Danil, this issue exists in radv
, v3dv
, turnip
and panvk
.