Module: Mesa
Branch: main
Commit: 58ababdee6cd6b1e08604033602e4a5f9d5ab7a3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=58ababdee6cd6b1e08604033602e4a5f9d5ab7a3

Author: Iván Briano <[email protected]>
Date:   Thu Jan 19 15:23:56 2023 -0800

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 <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20803>

---

 src/intel/vulkan/anv_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index cb30e55aad2..c034c4e4c10 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -2438,7 +2438,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,

Reply via email to