[Mesa-dev] [PATCH 1/2] mesa: add fix geometry shader memory leaks
Marek Olšák
maraeo at gmail.com
Tue Jul 8 18:12:45 PDT 2014
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Jul 9, 2014 at 12:32 AM, Brian Paul <brianp at vmware.com> wrote:
> Spotted by Charmaine Lee.
> Cc: "10.2" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/main/context.c | 3 +++
> src/mesa/main/shared.c | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index b082159..50aae8b 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -1215,6 +1215,9 @@ _mesa_free_context_data( struct gl_context *ctx )
> _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
> _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL);
>
> + _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL);
> + _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
> +
> _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
> _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
> _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
> diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
> index dc22025..5ae7014 100644
> --- a/src/mesa/main/shared.c
> +++ b/src/mesa/main/shared.c
> @@ -312,6 +312,7 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
> _mesa_DeleteHashTable(shared->Programs);
>
> _mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL);
> + _mesa_reference_geomprog(ctx, &shared->DefaultGeometryProgram, NULL);
> _mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL);
>
> _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx);
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list