summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-13 14:51:14 -0700
committerBrian Paul <[email protected]>2012-02-15 14:09:01 -0700
commit9600b0762b8007f63e96f590e338ea0a8e89e095 (patch)
tree32a63f0eade9a6ad5a8a58fd3e036a7d15b9f681 /src/mesa/state_tracker/st_texture.h
parent91ec17835f7923add522e01d486bc89683dfe881 (diff)
st/mesa: simplify st_create_texture_sampler_view()
Implement in terms of st_create_texture_sampler_view_format(). Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h21
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 b5c22ee370a..0b3e0be3cb4 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,