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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user