freedreno: move free() into fdN_context_destroy()

Following patches will be doing further cleanup after calling
fd_context_destroy() so it is easier if we move the free() into
the per-gen backend code.

Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
Rob Clark 2018-07-30 08:38:28 -04:00
parent dc9705f30d
commit 13b9d32fb1
5 changed files with 7 additions and 2 deletions

View File

@ -41,6 +41,7 @@ static void
fd2_context_destroy(struct pipe_context *pctx)
{
fd_context_destroy(pctx);
free(pctx);
}
static struct pipe_resource *

View File

@ -55,6 +55,8 @@ fd3_context_destroy(struct pipe_context *pctx)
fd_hw_query_fini(pctx);
fd_context_destroy(pctx);
free(fd3_ctx);
}
static const uint8_t primtypes[] = {

View File

@ -55,6 +55,8 @@ fd4_context_destroy(struct pipe_context *pctx)
fd_hw_query_fini(pctx);
fd_context_destroy(pctx);
free(fd4_ctx);
}
static const uint8_t primtypes[] = {

View File

@ -54,6 +54,8 @@ fd5_context_destroy(struct pipe_context *pctx)
u_upload_destroy(fd5_ctx->border_color_uploader);
fd_context_destroy(pctx);
free(fd5_ctx);
}
static const uint8_t primtypes[] = {

View File

@ -172,8 +172,6 @@ fd_context_destroy(struct pipe_context *pctx)
(uint32_t)ctx->stats.batch_gmem, (uint32_t)ctx->stats.batch_nondraw,
(uint32_t)ctx->stats.batch_restore);
}
FREE(ctx);
}
static void