[Mesa-dev] [PATCH 4/5] st/mesa: simplify st_create_texture_sampler_view()
Jose Fonseca
jfonseca at vmware.com
Tue Feb 14 06:57:01 PST 2012
Looks good.
Jose
----- Original Message -----
> Implement in terms of st_create_texture_sampler_view_format().
> ---
> src/mesa/state_tracker/st_texture.h | 21 +++++++++------------
> 1 files changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_texture.h
> b/src/mesa/state_tracker/st_texture.h
> index b5c22ee..0b3e0be 100644
> --- a/src/mesa/state_tracker/st_texture.h
> +++ b/src/mesa/state_tracker/st_texture.h
> @@ -123,18 +123,6 @@ st_get_stobj_resource(struct st_texture_object
> *stObj)
>
>
> static INLINE struct pipe_sampler_view *
> -st_create_texture_sampler_view(struct pipe_context *pipe,
> - struct pipe_resource *texture)
> -{
> - struct pipe_sampler_view templ;
> -
> - u_sampler_view_default_template(&templ, texture,
> texture->format);
> -
> - return pipe->create_sampler_view(pipe, texture, &templ);
> -}
> -
> -
> -static INLINE struct pipe_sampler_view *
> st_create_texture_sampler_view_format(struct pipe_context *pipe,
> struct pipe_resource *texture,
> enum pipe_format format)
> @@ -146,6 +134,15 @@ st_create_texture_sampler_view_format(struct
> pipe_context *pipe,
> return pipe->create_sampler_view(pipe, texture, &templ);
> }
>
> +static INLINE struct pipe_sampler_view *
> +st_create_texture_sampler_view(struct pipe_context *pipe,
> + struct pipe_resource *texture)
> +{
> + return st_create_texture_sampler_view_format(pipe, texture,
> + texture->format);
> +}
> +
> +
>
> extern struct pipe_resource *
> st_texture_create(struct st_context *st,
> --
> 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