aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-12 13:48:18 +0000
committermarha <marha@users.sourceforge.net>2011-04-12 13:48:18 +0000
commite2c8d047679db3bbb166d709b86e18180be6d713 (patch)
treed7468ac76dc71bb8d38c816be6db988bcbcbb863 /mesalib/src/mesa/state_tracker/st_texture.h
parent57fb3f76b66c5f7a9f7bed9c42fb9fec9d56ee05 (diff)
parent7730393619080086530e24d3b594351b4114f608 (diff)
downloadvcxsrv-e2c8d047679db3bbb166d709b86e18180be6d713.tar.gz
vcxsrv-e2c8d047679db3bbb166d709b86e18180be6d713.tar.bz2
vcxsrv-e2c8d047679db3bbb166d709b86e18180be6d713.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_texture.h')
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_texture.h b/mesalib/src/mesa/state_tracker/st_texture.h
index b25f16410..5c7216e60 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.h
+++ b/mesalib/src/mesa/state_tracker/st_texture.h
@@ -163,6 +163,21 @@ st_get_texture_sampler_view(struct st_texture_object *stObj,
}
+/**
+ * Get pointer to the active sampler object for the given texture unit.
+ * This will either be a user-defined sampler object or the texture
+ * object's own sampler state.
+ */
+static INLINE struct gl_sampler_object *
+st_get_mesa_sampler(const struct gl_context *ctx, GLuint unit)
+{
+ if (ctx->Texture.Unit[unit].Sampler)
+ return ctx->Texture.Unit[unit].Sampler;
+ else
+ return &ctx->Texture.Unit[unit]._Current->Sampler;
+}
+
+
extern struct pipe_resource *
st_texture_create(struct st_context *st,
enum pipe_texture_target target,