mesa: free current ComputeProgram state in _mesa_free_context_data

This is already done for other programs stages, fixes a leak when using
compute programs.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102844
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 589457d97f)
This commit is contained in:
Tapani Pälli 2017-09-20 09:29:16 +03:00 committed by Juan A. Suarez Romero
parent b92a4dff92
commit 6dc71ce3cc

View file

@ -1312,6 +1312,8 @@ _mesa_free_context_data( struct gl_context *ctx )
_mesa_reference_program(ctx, &ctx->FragmentProgram._Current, NULL);
_mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
_mesa_reference_program(ctx, &ctx->ComputeProgram._Current, NULL);
_mesa_reference_vao(ctx, &ctx->Array.VAO, NULL);
_mesa_reference_vao(ctx, &ctx->Array.DefaultVAO, NULL);