zink: unset pipe_resource::next pointers when creating resource copies
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 29 Apr 2022 14:57:53 +0000 (10:57 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 11 May 2022 01:30:38 +0000 (01:30 +0000)
this otherwise walks the chain and destroys all the resources

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

src/gallium/drivers/zink/zink_resource.c

index 2cc2023..a7694ce 100644 (file)
@@ -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;