vulkan: check 3D image type for VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15754>
This commit is contained in:
Mike Blumenkrantz 2022-04-05 08:39:34 -04:00 committed by Marge Bot
parent b91b90c256
commit 9a6ea51388

View file

@ -278,7 +278,7 @@ vk_image_view_init(struct vk_device *device,
break;
case VK_IMAGE_VIEW_TYPE_2D:
case VK_IMAGE_VIEW_TYPE_2D_ARRAY:
if (image->create_flags & VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT)
if (image->create_flags & (VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT | VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT))
assert(image->image_type == VK_IMAGE_TYPE_3D);
else
assert(image->image_type == VK_IMAGE_TYPE_2D);