mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
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>
This commit is contained in:
parent
28d902dd62
commit
824ae64477
3 changed files with 2 additions and 22 deletions
|
|
@ -1408,23 +1408,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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue