From 4c08db550183b085989468e0d6d1f97cc98e4c8e 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: --- src/gallium/drivers/zink/zink_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 2d60e8ffda5..650312f89b0 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;