Mesa (master): zink: fix pNext chain for resource memory allocation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 6 13:34:57 UTC 2020


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

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Fri Nov  6 14:07:45 2020 +0100

zink: fix pNext chain for resource memory allocation

This only links the VkImportMemoryFdInfoKHR struct into the pNext
chain when VkExportMemoryAllocateInfo is also included, which was
the original behavior before the regression.

Fixes: 92022f2846e00 (zink: add VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA for WSI allocations)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3755
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7474>

---

 src/gallium/drivers/zink/zink_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 99bcd579f27..6e78236a912 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -277,7 +277,7 @@ resource_create(struct pipe_screen *pscreen,
       imfi.fd = whandle->handle;
 
       imfi.pNext = mai.pNext;
-      mai.pNext = &imfi;
+      emai.pNext = &imfi;
    }
 
    struct wsi_memory_allocate_info memory_wsi_info = {



More information about the mesa-commit mailing list