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>
(cherry picked from commit 2ddd021bae)
This commit is contained in:
Rebecca Mckeever 2024-12-05 20:03:44 -08:00 committed by Eric Engestrom
parent c3afddf561
commit 6378d22e68
2 changed files with 2 additions and 1 deletions

View file

@ -244,7 +244,7 @@
"description": "panvk: Fix assertion in is_disjoint()",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "412c28633152e1f86a2e7e0932542588bfa87e6c",
"notes": null

View file

@ -316,6 +316,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;
}