mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02: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> (cherry picked from commit824ae64477)
This commit is contained in:
parent
33127367ef
commit
e307e3df0c
4 changed files with 3 additions and 23 deletions
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue