anv: document the X4 Foundations workaround a bit more

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32297>
This commit is contained in:
Lionel Landwerlin 2024-11-22 08:48:43 +02:00
parent 0fa3be44aa
commit b44faa22ab

View File

@ -1423,6 +1423,14 @@ VkResult anv_CreateDescriptorPool(
ANV_PIPELINE_DESCRIPTOR_SET_LAYOUT_TYPE_INDIRECT :
ANV_PIPELINE_DESCRIPTOR_SET_LAYOUT_TYPE_DIRECT;
/* Workaround application bugs when we're allocating surfaces & samplers in
* separate heaps (!indirect_descriptors). Some applications will specify a
* count of samplers too small and we might fail allocations in
* vkAllocateDescriptorsSets().
*
* Find the highest count across all descriptor types and use that for
* samplers.
*/
uint32_t max_descriptor_count = 0;
if (device->physical->instance->anv_upper_bound_descriptor_pool_sampler &&
!device->physical->indirect_descriptors) {