summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-04-29 10:57:53 -0400
committerMarge Bot <emma+marge@anholt.net>2022-05-11 01:30:38 +0000
commit8c1d9c7b744b2e5b40fd42cfd51256b16deea6a8 (patch)
tree342cf6faa0060aff996ba7638327d39f6a3a3cc4
parent9aab9b4a1b2986240da945d73916601aaf09bdef (diff)
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 <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
-rw-r--r--src/gallium/drivers/zink/zink_resource.c1
1 files changed, 1 insertions, 0 deletions
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;