[Mesa-dev] [PATCH 6/8] panfrost: Free context BOs
Tomeu Vizoso
tomeu.vizoso at collabora.com
Mon Mar 4 16:11:42 UTC 2019
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
src/gallium/drivers/panfrost/pan_context.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 776469c3e411..ac58411b265d 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -606,7 +606,7 @@ static void
panfrost_invalidate_frame(struct panfrost_context *ctx)
{
unsigned transient_count = ctx->transient_pools[ctx->cmdstream_i].entry_index*ctx->transient_pools[0].entry_size + ctx->transient_pools[ctx->cmdstream_i].entry_offset;
- printf("Uploaded transient %d bytes\n", transient_count);
+ //printf("Uploaded transient %d bytes\n", transient_count);
/* Rotate cmdstream */
if ((++ctx->cmdstream_i) == (sizeof(ctx->transient_pools) / sizeof(ctx->transient_pools[0])))
@@ -2594,9 +2594,16 @@ static void
panfrost_destroy(struct pipe_context *pipe)
{
struct panfrost_context *panfrost = pan_context(pipe);
+ struct panfrost_screen *screen = pan_screen(pipe->screen);
if (panfrost->blitter)
util_blitter_destroy(panfrost->blitter);
+
+ screen->driver->free_slab(screen, &panfrost->scratchpad);
+ screen->driver->free_slab(screen, &panfrost->varying_mem);
+ screen->driver->free_slab(screen, &panfrost->shaders);
+ screen->driver->free_slab(screen, &panfrost->tiler_heap);
+ screen->driver->free_slab(screen, &panfrost->misc_0);
}
static struct pipe_query *
--
2.20.1
More information about the mesa-dev
mailing list