zink: don't clamp 2D_ARRAY surfaces to 2D
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 28 Oct 2021 14:31:40 +0000 (10:31 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 1 Nov 2021 00:49:24 +0000 (00:49 +0000)
another thing that used to be needed but now isn't

cc: mesa-stable

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 cb08869..0c78008 100644 (file)
@@ -125,9 +125,6 @@ zink_surface_clamp_viewtype(VkImageViewType viewType, unsigned first_layer, unsi
          return VK_IMAGE_VIEW_TYPE_2D;
       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)
-         return VK_IMAGE_VIEW_TYPE_2D;
    }
    return viewType;
 }