[Mesa-dev] [PATCH 1/5] st/mesa: use private pipe_sampler_view in st_render_mipmap()

Jose Fonseca jfonseca at vmware.com
Tue Feb 14 06:48:24 PST 2012


Looks good to me.

Jose

----- Original Message -----
> Rather than the one in st_texture_object.  This sampler view really
> has
> no connection to the one used for rendering.
> ---
>  src/mesa/state_tracker/st_gen_mipmap.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_gen_mipmap.c
> b/src/mesa/state_tracker/st_gen_mipmap.c
> index d817a9c..8179b5b 100644
> --- a/src/mesa/state_tracker/st_gen_mipmap.c
> +++ b/src/mesa/state_tracker/st_gen_mipmap.c
> @@ -75,7 +75,7 @@ st_render_mipmap(struct st_context *st,
>  {
>     struct pipe_context *pipe = st->pipe;
>     struct pipe_screen *screen = pipe->screen;
> -   struct pipe_sampler_view *psv =
> st_get_texture_sampler_view(stObj, pipe);
> +   struct pipe_sampler_view *psv;
>     const uint face = _mesa_tex_target_to_face(target);
>  
>     assert(psv->texture == stObj->pt);
> @@ -91,6 +91,8 @@ st_render_mipmap(struct st_context *st,
>        return FALSE;
>     }
>  
> +   psv = st_create_texture_sampler_view(pipe, stObj->pt);
> +
>     /* Disable conditional rendering. */
>     if (st->render_condition) {
>        pipe->render_condition(pipe, NULL, 0);
> @@ -103,6 +105,8 @@ st_render_mipmap(struct st_context *st,
>        pipe->render_condition(pipe, st->render_condition,
>        st->condition_mode);
>     }
>  
> +   pipe_sampler_view_reference(&psv, NULL);
> +
>     return TRUE;
>  }
>  
> --
> 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