mesa: delete task and mesh programs on context destroy

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37623>
This commit is contained in:
Mike Blumenkrantz 2025-09-29 11:29:57 -04:00 committed by Marge Bot
parent 7e0c0ba08c
commit 3b63317d93
2 changed files with 5 additions and 0 deletions

View file

@ -1088,6 +1088,9 @@ _mesa_free_context_data(struct gl_context *ctx, bool destroy_debug_output)
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current, NULL);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
_mesa_reference_program(ctx, &ctx->TaskProgram._Current, NULL);
_mesa_reference_program(ctx, &ctx->MeshProgram._Current, NULL);
_mesa_reference_program(ctx, &ctx->ComputeProgram._Current, NULL);
_mesa_reference_vao(ctx, &ctx->Array.VAO, NULL);

View file

@ -968,6 +968,8 @@ st_destroy_context(struct st_context *st)
st_release_program(st, &st->tcp);
st_release_program(st, &st->tep);
st_release_program(st, &st->cp);
st_release_program(st, &st->tp);
st_release_program(st, &st->mp);
if (st->hw_select_shaders) {
hash_table_foreach(st->hw_select_shaders, entry)