summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-05-23 10:09:33 +0200
committerTomeu Vizoso <[email protected]>2019-05-24 16:50:09 +0200
commit9fe1a925e2a4093cd88152a52ad48677d02f6ba5 (patch)
treee2e89e89d0cc16f92008edd17c3c0617522f6764 /src
parent3c81010213797b7b83be7b06665db80793b8d27e (diff)
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 <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 5cae386f070..b3f89ea9cc4 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