From 5a05a39e5631ffcaa01eee73c198700bdb982bfc Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Tue, 28 Oct 2025 12:41:40 -0400 Subject: [PATCH] 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 Part-of: --- src/intel/vulkan/anv_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 3ecec4245f2..432136c2d7a 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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,