anv: Use a util_sparse_array for the GEM handle -> BO map
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 25 Oct 2019 17:45:41 +0000 (12:45 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 31 Oct 2019 13:46:08 +0000 (13:46 +0000)
commitbbf389013ff851b3d60fee92fccf7c6cb94e4e29
tree88422110776a5c7c1a3e2ea94a59748387adb461
parent821ce7be36ee521c618d66d559425d6226f46fcf
anv: Use a util_sparse_array for the GEM handle -> BO map

This lets us do less allocation because the anv_bo's are now embedded in
the sparse array and it also allows lock-free translation from GEM
handle to BO which will be useful in future commits.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_private.h