anv: Limit the SCANOUT flag to color images

This will matter with the next patch, when we'll start importing and
exporting depth dmabufs with modifiers.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38095>
This commit is contained in:
Nanley Chery 2025-10-28 12:41:40 -04:00 committed by Marge Bot
parent 7a71952762
commit 5a05a39e56

View file

@ -1608,7 +1608,9 @@ VkResult anv_AllocateMemory(
* heap and then PAT entry in the later vm_bind stage.
*/
assert(device->info->ver >= 20);
alloc_flags |= ANV_BO_ALLOC_SCANOUT;
assert(image);
if (vk_format_is_color(image->vk.format))
alloc_flags |= ANV_BO_ALLOC_SCANOUT;
}
result = anv_device_import_bo(device, fd_info->fd, alloc_flags,