From b9def8ca05fa700208837fcc470721525487bd79 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 15 Feb 2024 15:07:29 -0500 Subject: [PATCH] zink: don't add VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for sparse textures according to VUID-VkImageCreateInfo-flags-09403, this is illegal cc: mesa-stable Reviewed-by: Dave Airlie Part-of: (cherry picked from commit 4c08db550183b085989468e0d6d1f97cc98e4c8e) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_resource.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d898797dff3..4ed7eefb8ff 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3194,7 +3194,7 @@ "description": "zink: don't add VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for sparse textures", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 92f9d720ba3..0c692cff6e9 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -729,7 +729,8 @@ init_ici(struct zink_screen *screen, VkImageCreateInfo *ici, const struct pipe_r case PIPE_TEXTURE_3D: ici->imageType = VK_IMAGE_TYPE_3D; - ici->flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; + if (!(templ->flags & PIPE_RESOURCE_FLAG_SPARSE)) + ici->flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; if (screen->info.have_EXT_image_2d_view_of_3d) ici->flags |= VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT; break;