anv: don't allocate aux padded BOs with host pointers

We can't allocate additional space with host pointers anyway. These
are already allocated pieces of memory by the application.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 646a7c864d ("anv: re-introduce BO CCS allocations")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10608
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27612>
This commit is contained in:
Lionel Landwerlin
2024-02-14 09:39:12 +02:00
committed by Marge Bot
parent feb7cf82dc
commit 34078b67ed

View File

@@ -4104,7 +4104,8 @@ VkResult anv_AllocateMemory(
if (device->info->has_aux_map)
alloc_flags |= ANV_BO_ALLOC_AUX_TT_ALIGNED;
/* If the allocation is not dedicated, allocate additional CCS space.
/* If the allocation is not dedicated nor a host pointer, allocate
* additional CCS space.
*
* TODO: If we ever ship VK_EXT_descriptor_buffer (ahahah... :() we could
* drop this flag in the descriptor buffer case as we don't need any
@@ -4113,7 +4114,9 @@ VkResult anv_AllocateMemory(
* TODO: We could also create new memory types for allocations that don't
* need any compression.
*/
if (device->physical->alloc_aux_tt_mem && dedicated_info == NULL)
if (device->physical->alloc_aux_tt_mem &&
dedicated_info == NULL &&
mem->vk.host_ptr == NULL)
alloc_flags |= ANV_BO_ALLOC_AUX_CCS;
/* TODO: Android, ChromeOS and other applications may need another way to