aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_texture.h')
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.h31
1 files changed, 6 insertions, 25 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_texture.h b/mesalib/src/mesa/state_tracker/st_texture.h
index 3d2a6369c..62e975bb4 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.h
+++ b/mesalib/src/mesa/state_tracker/st_texture.h
@@ -45,7 +45,7 @@ struct st_texture_image
{
struct gl_texture_image base;
- /** Used to store texture data that doesn't fit in the patent
+ /** Used to store texture data that doesn't fit in the parent
* object's mipmap buffer.
*/
GLubyte *TexData;
@@ -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,23 +134,16 @@ 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_get_texture_sampler_view(struct st_texture_object *stObj,
- struct pipe_context *pipe)
+st_create_texture_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *texture)
{
- if (!stObj || !stObj->pt) {
- return NULL;
- }
-
- if (!stObj->sampler_view) {
- stObj->sampler_view = st_create_texture_sampler_view(pipe, stObj->pt);
- }
-
- return stObj->sampler_view;
+ return st_create_texture_sampler_view_format(pipe, texture,
+ texture->format);
}
+
extern struct pipe_resource *
st_texture_create(struct st_context *st,
enum pipe_texture_target target,