mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
main: Fix memleaks in mesa_use_program
Add freeing of SubroutineIndexes to the _mesa_free_shader_state.
Fixes: 4566aaaa5b ("mesa/subroutines: start adding per-context
subroutine index support (v1.1)")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
fa2fc68de1
commit
882fe09a74
1 changed files with 2 additions and 0 deletions
|
|
@ -164,6 +164,8 @@ _mesa_free_shader_state(struct gl_context *ctx)
|
|||
_mesa_reference_shader_program(ctx,
|
||||
&ctx->Shader.ReferencedPrograms[i],
|
||||
NULL);
|
||||
free(ctx->SubroutineIndex[i].IndexPtr);
|
||||
ctx->SubroutineIndex[i].IndexPtr = NULL;
|
||||
}
|
||||
_mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue