Mesa (staging/21.2): zink: fully zero surface creation struct

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 20 17:40:44 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Oct 18 10:40:12 2021 -0400

zink: fully zero surface creation struct

gotta get those holes for caching

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13410>
(cherry picked from commit e66558985a9e85393ff844f8a16e85b4cf812f0e)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 80c4a6ac3c9..c88a52b7793 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -598,7 +598,7 @@
         "description": "zink: fully zero surface creation struct",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c
index b3fe21ad8c1..b47e2e5a3c3 100644
--- a/src/gallium/drivers/zink/zink_surface.c
+++ b/src/gallium/drivers/zink/zink_surface.c
@@ -37,7 +37,9 @@ create_ivci(struct zink_screen *screen,
             const struct pipe_surface *templ,
             enum pipe_texture_target target)
 {
-   VkImageViewCreateInfo ivci = {0};
+   VkImageViewCreateInfo ivci;
+   /* zero holes since this is hashed */
+   memset(&ivci, 0, sizeof(VkImageViewCreateInfo));
    ivci.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
    ivci.image = res->obj->image;
 



More information about the mesa-commit mailing list