st/mesa: simplify st_create_texture_sampler_view()
authorBrian Paul <brianp@vmware.com>
Mon, 13 Feb 2012 21:51:14 +0000 (14:51 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 15 Feb 2012 21:09:01 +0000 (14:09 -0700)
Implement in terms of st_create_texture_sampler_view_format().

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_texture.h

index b5c22ee370a82112ca2b5e03a0de941cd20087d8..0b3e0be3cb468001aac38927097683f778511197 100644 (file)
@@ -122,18 +122,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,
@@ -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,