summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index 76ea7e6950..416468478b 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -34,7 +34,7 @@
#include "main/mtypes.h"
-struct pipe_context;
+
struct pipe_resource;
@@ -76,8 +76,6 @@ struct st_texture_object
*/
struct pipe_sampler_view *sampler_view;
- struct pipe_context *pipe;
-
GLboolean teximage_realloc;
/* True if there is/was a surface bound to this texture object. It helps
@@ -101,7 +99,7 @@ st_texture_object(struct gl_texture_object *obj)
static INLINE struct pipe_resource *
-st_get_texobj_texture(struct gl_texture_object *texObj)
+st_get_texobj_resource(struct gl_texture_object *texObj)
{
struct st_texture_object *stObj = st_texture_object(texObj);
return stObj ? stObj->pt : NULL;
@@ -109,15 +107,15 @@ st_get_texobj_texture(struct gl_texture_object *texObj)
static INLINE struct pipe_resource *
-st_get_stobj_texture(struct st_texture_object *stObj)
+st_get_stobj_resource(struct st_texture_object *stObj)
{
return stObj ? stObj->pt : NULL;
}
static INLINE struct pipe_sampler_view *
-st_sampler_view_from_texture(struct pipe_context *pipe,
- struct pipe_resource *texture)
+st_create_texture_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *texture)
{
struct pipe_sampler_view templ;
@@ -130,14 +128,16 @@ st_sampler_view_from_texture(struct pipe_context *pipe,
static INLINE struct pipe_sampler_view *
-st_get_stobj_sampler_view(struct st_texture_object *stObj)
+st_get_texture_sampler_view(struct st_texture_object *stObj,
+ struct pipe_context *pipe)
+
{
if (!stObj || !stObj->pt) {
return NULL;
}
if (!stObj->sampler_view) {
- stObj->sampler_view = st_sampler_view_from_texture(stObj->pipe, stObj->pt);
+ stObj->sampler_view = st_create_texture_sampler_view(pipe, stObj->pt);
}
return stObj->sampler_view;