From: Tomeu Vizoso Date: Thu, 23 May 2019 08:09:33 +0000 (+0200) Subject: panfrost: Dereference sampled texture X-Git-Tag: upstream/19.3.0~6094 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fe1a925e2a4093cd88152a52ad48677d02f6ba5;p=platform%2Fupstream%2Fmesa.git panfrost: Dereference sampled texture We are currently leaking resources if they were sampled from. Once we are done with a sampler, we should dereference that resource. Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 5cae386..b3f89ea 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -2057,13 +2057,10 @@ panfrost_set_sampler_views( static void panfrost_sampler_view_destroy( struct pipe_context *pctx, - struct pipe_sampler_view *views) + struct pipe_sampler_view *view) { - //struct panfrost_context *ctx = pan_context(pctx); - - /* TODO */ - - free(views); + pipe_resource_reference(&view->texture, NULL); + free(view); } static void