[Mesa-dev] [PATCH 3/3] st/mesa: Revert use pipe_sampler_view_release()

Brian Paul brianp at vmware.com
Mon Mar 24 08:36:34 PDT 2014


On 03/24/2014 08:06 AM, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
>
> The original problem is fixed by now and unconditionally
> destroying the sampler view, which is possible still
> referenced elsewhere, is a really bad idea also.
>
> This reverts commit 670be71bd801fea876f7512865ed5f54340da9be.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Cc: "10.0 10.1" <mesa-stable at lists.freedesktop.org>
> ---
>   src/mesa/state_tracker/st_atom_texture.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
> index 2826d12..eaa43d5 100644
> --- a/src/mesa/state_tracker/st_atom_texture.c
> +++ b/src/mesa/state_tracker/st_atom_texture.c
> @@ -262,7 +262,7 @@ update_single_texture(struct st_context *st,
>   				stObj->base.DepthMode) ||
>   	  (view_format != stObj->sampler_view->format) ||
>   	  stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) {
> -	 pipe_sampler_view_release(pipe, &stObj->sampler_view);
> +	 pipe_sampler_view_reference(&stObj->sampler_view, NULL);
>         }
>      }

The pipe_sampler_view_release() obeys reference counting too so I don't 
think this change is necessary.

-Brian




More information about the mesa-dev mailing list