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>
This commit is contained in:
Mike Blumenkrantz 2022-04-29 10:57:53 -04:00 committed by Marge Bot
parent 9aab9b4a1b
commit 8c1d9c7b74
1 changed files with 1 additions and 0 deletions

View 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;