zink: don't clamp cube array surfacess to cubes
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 28 Oct 2021 14:03:22 +0000 (10:03 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 1 Nov 2021 00:49:24 +0000 (00:49 +0000)
this was probably necessary for some other reason that has since been fixed,
and instead now just creates validation spam

cc: mesa-stable

fixes #5566

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13586>

src/gallium/drivers/zink/zink_surface.h

index b6de77c..cb08869 100644 (file)
@@ -123,10 +123,7 @@ zink_surface_clamp_viewtype(VkImageViewType viewType, unsigned first_layer, unsi
    if (viewType == VK_IMAGE_VIEW_TYPE_CUBE || viewType == VK_IMAGE_VIEW_TYPE_CUBE_ARRAY) {
       if (first_layer == last_layer)
          return VK_IMAGE_VIEW_TYPE_2D;
-      if (layerCount % 6 == 0) {
-         if (viewType == VK_IMAGE_VIEW_TYPE_CUBE_ARRAY && layerCount == 6)
-            return VK_IMAGE_VIEW_TYPE_CUBE;
-      } else if (first_layer || layerCount != array_size)
+      if (layerCount % 6 != 0 && (first_layer || layerCount != array_size))
          return VK_IMAGE_VIEW_TYPE_2D_ARRAY;
    } else if (viewType == VK_IMAGE_VIEW_TYPE_2D_ARRAY) {
       if (first_layer == last_layer)