From 8e9ec440afc63c8003443fac3885bb856c23a06f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 15 Sep 2021 15:04:47 -0400 Subject: [PATCH] zink: don't copy inner surface refcount this leaks surfaces. lots of surfaces. Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c index 4b712cc9340..fc38b08caa1 100644 --- a/src/gallium/drivers/zink/zink_surface.c +++ b/src/gallium/drivers/zink/zink_surface.c @@ -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;