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:
parent
dc9705f30d
commit
13b9d32fb1
|
@ -41,6 +41,7 @@ static void
|
|||
fd2_context_destroy(struct pipe_context *pctx)
|
||||
{
|
||||
fd_context_destroy(pctx);
|
||||
free(pctx);
|
||||
}
|
||||
|
||||
static struct pipe_resource *
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue