panvk: Fix assertion in is_disjoint()

We were not correctly following VUID-VkImageCreateInfo-format-01577:

If format is not a multi-planar format, and flags does not
include VK_IMAGE_CREATE_ALIAS_BIT, flags must not contain
VK_IMAGE_CREATE_DISJOINT_BIT.

Fixes: 412c2863 ("panvk: Enable multiplane images and image views")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
This commit is contained in:
Rebecca Mckeever 2024-12-05 20:03:44 -08:00 committed by Marge Bot
parent cdf24f067e
commit 2ddd021bae

View file

@ -317,6 +317,7 @@ is_disjoint(struct panvk_image *image)
{
assert((image->plane_count > 1 &&
image->vk.format != VK_FORMAT_D32_SFLOAT_S8_UINT) ||
(image->vk.create_flags & VK_IMAGE_CREATE_ALIAS_BIT) ||
!(image->vk.create_flags & VK_IMAGE_CREATE_DISJOINT_BIT));
return image->vk.create_flags & VK_IMAGE_CREATE_DISJOINT_BIT;
}