Merge branch 'review/anv-disable-slab-with-memoryMapPlaced' into 'main'

anv: disable slab allocator with memoryMapPlaced

See merge request mesa/mesa!40239
This commit is contained in:
Lionel Landwerlin 2026-03-11 04:58:29 +00:00
commit cf35945a07

View file

@ -31,6 +31,15 @@ static enum anv_bo_slab_heap
anv_bo_alloc_flags_to_slab_heap(struct anv_device *device,
enum anv_bo_alloc_flags alloc_flags)
{
/* Until we have a uAPI to map memory from a GEM object at an offset, we
* cannot use a slab allocator for VkDeviceMemory host visible.
*/
if (device->vk.enabled_features.memoryMapPlaced &&
!(alloc_flags & ANV_BO_ALLOC_MAPPED) &&
(alloc_flags & (ANV_BO_ALLOC_HOST_CACHED_COHERENT |
ANV_BO_ALLOC_LOCAL_MEM_CPU_VISIBLE)))
return ANV_BO_SLAB_NOT_SUPPORTED;
enum anv_bo_alloc_flags not_supported = ANV_BO_ALLOC_32BIT_ADDRESS |
ANV_BO_ALLOC_EXTERNAL |
ANV_BO_ALLOC_CAPTURE |