Mesa (staging/21.3): zink: don't clamp cube array surfacess to cubes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 1 19:36:40 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: e4123c5cf4993614cffd4f6b5099d65c483ad545
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4123c5cf4993614cffd4f6b5099d65c483ad545

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Oct 28 10:03:22 2021 -0400

zink: don't clamp cube array surfacess to cubes

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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13586>
(cherry picked from commit 8d2280f533faf5e372d604cf35b355b898423375)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/zink/zink_surface.h | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index acf7b476a2b..d80f3f008ae 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -94,7 +94,7 @@
         "description": "zink: don't clamp cube array surfacess to cubes",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_surface.h b/src/gallium/drivers/zink/zink_surface.h
index b6de77cd596..cb08869c2b4 100644
--- a/src/gallium/drivers/zink/zink_surface.h
+++ b/src/gallium/drivers/zink/zink_surface.h
@@ -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)



More information about the mesa-commit mailing list