anv: don't lazy allocate surface states in descriptor sets
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 8 Mar 2022 14:56:50 +0000 (16:56 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Mar 2022 08:47:15 +0000 (08:47 +0000)
commit87f59b18cf438fb468c64363d95f94dc5c86314a
tree9ae16bc30e167d652ec32d5795a2598749e497da
parent71cd6a7b84c44c3dc79f6916542a2ccc633d9766
anv: don't lazy allocate surface states in descriptor sets

In 4001d9ce1a6e we started lazily allocating surface states in the
descriptor sets rather than upfront in the descriptor pool. This was
to workaround vkd3d-proton allocating more than we could handle at the
HW level.

The issue introduced in that change is that we didn't protect the
descriptor pool free list as well as the anv_state_stream which are
now potentially used from different threads through the descriptor set
write functions.

This reverts the lazy allocation part of that change. Host only
descriptor sets changes remain.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4001d9ce1a6e ("anv: Handle VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE for descriptor sets")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15241>
src/intel/vulkan/anv_descriptor_set.c