diff --git a/.pick_status.json b/.pick_status.json index 157cb54b839..d8855a0ac9d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 98e189af08a..1376c5b680c 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -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. * diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 9ffd75fbae3..202a2f2d9bf 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -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); diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 95263ea19ad..709511b5991 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -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;