[Mesa-dev] [PATCH] mesa: free current ComputeProgram state in _mesa_free_context_data

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Sep 20 07:09:43 UTC 2017


Oh right.

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 09/20/2017 08:29 AM, Tapani Pälli wrote:
> This is already done for other programs stages, fixes a leak when using
> compute programs.
> 
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102844
> ---
>   src/mesa/main/context.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index dad3ab39f8..55a65ac2ab 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -1329,6 +1329,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);
>   
> 


More information about the mesa-dev mailing list