zink: don't copy inner surface refcount

this leaks surfaces. lots of surfaces.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875>
This commit is contained in:
Mike Blumenkrantz 2021-09-15 15:04:47 -04:00 committed by Marge Bot
parent 929db0a818
commit 8e9ec440af

View file

@ -192,6 +192,7 @@ wrap_surface(struct pipe_context *pctx, struct pipe_surface *psurf)
{
struct zink_ctx_surface *csurf = CALLOC_STRUCT(zink_ctx_surface);
csurf->base = *psurf;
pipe_reference_init(&csurf->base.reference, 1);
csurf->surf = (struct zink_surface*)psurf;
csurf->base.context = pctx;