Module: Mesa
Branch: main
Commit: 8c1d9c7b744b2e5b40fd42cfd51256b16deea6a8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c1d9c7b744b2e5b40fd42cfd51256b16deea6a8

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Apr 29 10:57:53 2022 -0400

zink: unset pipe_resource::next pointers when creating resource copies

this otherwise walks the chain and destroys all the resources

cc: mesa-stable

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

---

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

diff --git a/src/gallium/drivers/zink/zink_resource.c 
b/src/gallium/drivers/zink/zink_resource.c
index 2cc2023daf5..a7694ce2002 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1647,6 +1647,7 @@ zink_image_map(struct pipe_context *pctx,
                                                          box->height);
 
       struct pipe_resource templ = *pres;
+      templ.next = NULL;
       templ.format = format;
       templ.usage = usage & PIPE_MAP_READ ? PIPE_USAGE_STAGING : 
PIPE_USAGE_STREAM;
       templ.target = PIPE_BUFFER;

Reply via email to