anv: Assert that we only import ahb image with one layer

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37177>
This commit is contained in:
Lucas Fryzek
2025-09-30 15:12:51 -04:00
committed by Marge Bot
parent 9493f7781d
commit 232f8c42f7
+2
View File
@@ -1817,6 +1817,8 @@ anv_image_init(struct anv_device *device, struct anv_image *image,
/* In case of AHardwareBuffer import, we don't know the layout yet */
if (image->vk.external_handle_types &
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID) {
/* AHB images with more than one layer are not supported */
assert(image->vk.array_layers == 1);
image->from_ahb = true;
return VK_SUCCESS;
}