summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-11-28 15:15:21 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:10 -0800
commitf73fdb4001365a6097ced767288fa581c689709d (patch)
tree198ec0a5f543a42563981bd08d8766139b3fe54d /src
parent3d55e9a2aa213e83b971eb4d1a4205f9a403e165 (diff)
iris: Destroy the border color pool
This plugs a 12224 byte leak
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_border_color.c8
-rw-r--r--src/gallium/drivers/iris/iris_context.c1
-rw-r--r--src/gallium/drivers/iris/iris_context.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_border_color.c b/src/gallium/drivers/iris/iris_border_color.c
index 72c7ee4904c..ebed3e4445d 100644
--- a/src/gallium/drivers/iris/iris_border_color.c
+++ b/src/gallium/drivers/iris/iris_border_color.c
@@ -93,6 +93,14 @@ iris_init_border_color_pool(struct iris_context *ice)
iris_reset_border_color_pool(pool, bufmgr);
}
+void
+iris_destroy_border_color_pool(struct iris_context *ice)
+{
+ struct iris_border_color_pool *pool = &ice->state.border_color_pool;
+ iris_bo_unreference(pool->bo);
+ ralloc_free(pool->ht);
+}
+
/**
* Reserve space for a number of border colors. If no space, flushes any
* batches that are referring to the old BO and makes a new one.
diff --git a/src/gallium/drivers/iris/iris_context.c b/src/gallium/drivers/iris/iris_context.c
index 75b1be27306..0bf100ae4db 100644
--- a/src/gallium/drivers/iris/iris_context.c
+++ b/src/gallium/drivers/iris/iris_context.c
@@ -110,6 +110,7 @@ iris_destroy_context(struct pipe_context *ctx)
ice->vtbl.destroy_state(ice);
iris_destroy_program_cache(ice);
+ iris_destroy_border_color_pool(ice);
u_upload_destroy(ice->state.surface_uploader);
u_upload_destroy(ice->state.dynamic_uploader);
diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h
index 601dabb4cef..5c5fbaf7eab 100644
--- a/src/gallium/drivers/iris/iris_context.h
+++ b/src/gallium/drivers/iris/iris_context.h
@@ -587,6 +587,7 @@ void gen11_init_blorp(struct iris_context *ice);
/* iris_border_color.c */
void iris_init_border_color_pool(struct iris_context *ice);
+void iris_destroy_border_color_pool(struct iris_context *ice);
void iris_border_color_pool_reserve(struct iris_context *ice, unsigned count);
uint32_t iris_upload_border_color(struct iris_context *ice,
union pipe_color_union *color);