Mesa (master): zink: don't lose existing pNext when using wsi_image_create_info in image creation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 9 16:04:27 UTC 2021


Module: Mesa
Branch: master
Commit: 17b5ca5869e5aab7c6c08c27336844fc545150a6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=17b5ca5869e5aab7c6c08c27336844fc545150a6

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Apr  9 10:43:59 2021 -0400

zink: don't lose existing pNext when using wsi_image_create_info in image creation

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10138>

---

 src/gallium/drivers/zink/zink_resource.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index a75fc1aae64..f1c5f6f64d9 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -417,8 +417,10 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
          .scanout = true,
       };
 
-      if (screen->needs_mesa_wsi && (templ->bind & PIPE_BIND_SCANOUT))
+      if (screen->needs_mesa_wsi && (templ->bind & PIPE_BIND_SCANOUT)) {
+         image_wsi_info.pNext = ici.pNext;
          ici.pNext = &image_wsi_info;
+      }
 
       VkResult result = vkCreateImage(screen->dev, &ici, NULL, &obj->image);
       if (result != VK_SUCCESS) {



More information about the mesa-commit mailing list