From 8766da2cdbdeb3b1964176dfd21b4c69e042f7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Thu, 19 Jan 2023 15:23:56 -0800 Subject: [PATCH] anv: uncompressed views of compressed 3d images are now valid There was a VUID-VkImageViewCreateInfo-image-04739 in the Vulkan 1.3 spec that said: If image was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and format is a non-compressed format, viewType must not be VK_IMAGE_VIEW_TYPE_3D That VUID has since been removed, and when a view of a 3D image is created, with put the depth into the array_len, so it won't be always 1. Reviewed-by: Mark Janes Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 58ababdee6cd6b1e08604033602e4a5f9d5ab7a3) --- .pick_status.json | 2 +- src/intel/vulkan/anv_image.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4afc8cb1882..6e4d1abee58 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -7546,7 +7546,7 @@ "description": "anv: uncompressed views of compressed 3d images are now valid", "nominated": false, "nomination_type": null, - "resolution": 4, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 557abe11692..ef31b327ead 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -2430,7 +2430,7 @@ anv_image_fill_surface_state(struct anv_device *device, */ assert(surface->isl.samples == 1); assert(view.levels == 1); - assert(view.array_len == 1); + assert(surface->isl.dim == ISL_SURF_DIM_3D || view.array_len == 1); ASSERTED bool ok = isl_surf_get_uncompressed_surf(&device->isl_dev, isl_surf, &view,