Skip to content

anv, hasvk: pMutableDescriptorTypeLists can be out of range on pool creation

Ivan Briano requested to merge ibriano/mesa:mutable into main

What does this MR do and why?

anv, hasvk: pMutableDescriptorTypeLists can be out of range on pool creation

The spec for vkCreateDescriptorPool says:
   If VkMutableDescriptorTypeCreateInfoEXT does not exist in the pNext
   chain, or VkMutableDescriptorTypeCreateInfoEXT::pMutableDescriptorTypeLists[i]
   is out of range, the descriptor pool allocates enough memory to be
   able to allocate a VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptor with any
   supported VkDescriptorType as a mutable descriptor.

So check that mutableDescriptorTypeListCount is in range of the binding
we are asking for instead of just 0.

Merge request reports