mesa: Remove _mesa_destroy_context()

There was only one caller, an error path in mesa/st.  But this is now
incorrect as we need align_free().  Just remove it.

Fixes: 55e853d823 ("mesa/st: Allocate the gl_context with 16-byte alignment.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8801>
(cherry picked from commit 824ae64477)
This commit is contained in:
Rob Clark 2021-01-31 08:58:09 -08:00 committed by Dylan Baker
parent 33127367ef
commit e307e3df0c
4 changed files with 3 additions and 23 deletions

View file

@ -166,7 +166,7 @@
"description": "mesa: Remove _mesa_destroy_context()",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "55e853d823e860dd232a8be0378bd0519e35b6bd"
},

View file

@ -1404,23 +1404,6 @@ _mesa_free_context_data(struct gl_context *ctx, bool destroy_debug_output)
}
/**
* Destroy a struct gl_context structure.
*
* \param ctx GL context.
*
* Calls _mesa_free_context_data() and frees the gl_context object itself.
*/
void
_mesa_destroy_context( struct gl_context *ctx )
{
if (ctx) {
_mesa_free_context_data(ctx, true);
free( (void *) ctx );
}
}
/**
* Copy attribute groups from one context to another.
*

View file

@ -120,10 +120,6 @@ _mesa_initialize_context( struct gl_context *ctx,
extern void
_mesa_free_context_data(struct gl_context *ctx, bool destroy_debug_output);
extern void
_mesa_destroy_context( struct gl_context *ctx );
extern void
_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask);

View file

@ -1044,7 +1044,8 @@ st_create_context(gl_api api, struct pipe_context *pipe,
st = st_create_context_priv(ctx, pipe, options, no_error);
if (!st) {
_mesa_destroy_context(ctx);
_mesa_free_context_data(ctx, true);
align_free(ctx);
}
return st;