Mesa (staging/22.0): zink: fix sparse binding for arrayed textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 16 19:33:37 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: 6a758e2265dc679397c60b963e448e5c3d4b7adc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6a758e2265dc679397c60b963e448e5c3d4b7adc

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed May 11 16:03:16 2022 -0400

zink: fix sparse binding for arrayed textures

this needs to set the arrayLayer, not the z offset

big thanks to Piers Daniell for catching this

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16456>
(cherry picked from commit 377f5e7af958101160907f125a0349df8cec934a)

---

 .pick_status.json                  | 2 +-
 src/gallium/drivers/zink/zink_bo.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 2d874cea485..9ad472c519d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1884,7 +1884,7 @@
         "description": "zink: fix sparse binding for arrayed textures",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": null
     },
     {
diff --git a/src/gallium/drivers/zink/zink_bo.c b/src/gallium/drivers/zink/zink_bo.c
index 72c570cca7d..9ba8e8e7cb5 100644
--- a/src/gallium/drivers/zink/zink_bo.c
+++ b/src/gallium/drivers/zink/zink_bo.c
@@ -928,7 +928,7 @@ zink_bo_commit(struct zink_screen *screen, struct zink_resource *res, unsigned l
             // Offset
             ibind[i].offset.x = w * gwidth;
             ibind[i].offset.y = h * gheight;
-            if (res->base.b.target == PIPE_TEXTURE_CUBE) {
+            if (res->base.b.array_size > 1) {
                ibind[i].subresource.arrayLayer = d * gdepth;
                ibind[i].offset.z = 0;
             } else {



More information about the mesa-commit mailing list