[Mesa-dev] [PATCH] st/mesa: use pipe_sampler_view_release() in st_destroy_context_priv()

Jose Fonseca jfonseca at vmware.com
Sat May 19 04:36:30 PDT 2012


Sounds good.

Jose

----- Original Message -----
> Fixes another case of sampler views being created by one context,
> shared by another, then deleted by the first, leaving a dangling
> pipe context pointer.
> ---
>  src/mesa/state_tracker/st_context.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_context.c
> b/src/mesa/state_tracker/st_context.c
> index b449765..132dcc0 100644
> --- a/src/mesa/state_tracker/st_context.c
> +++ b/src/mesa/state_tracker/st_context.c
> @@ -247,7 +247,7 @@ static void st_destroy_context_priv( struct
> st_context *st )
>     st_destroy_drawtex(st);
>  
>     for (i = 0; i < Elements(st->state.sampler_views); i++) {
> -      pipe_sampler_view_reference(&st->state.sampler_views[i],
> NULL);
> +      pipe_sampler_view_release(st->pipe,
> &st->state.sampler_views[i]);
>     }
>  
>     if (st->default_texture) {
> --
> 1.7.3.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