summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_types.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2011-11-14 14:02:09 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-01-11 12:51:24 -0800
commit32be81de39f7548e353afabf1215b0ea7c7b0916 (patch)
tree654eb52334ab6494b9eb3eb836bf6d037b8b12c2 /src/glsl/glsl_types.h
parent195ee502c3196607e3a74075aefade9770a08a67 (diff)
glsl: Add glsl_type::sampler_index
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r--src/glsl/glsl_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index 4ac90118b86..2997c931149 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -28,6 +28,7 @@
#include <string.h>
#include <assert.h>
+#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
#ifdef __cplusplus
extern "C" {
@@ -354,6 +355,11 @@ struct glsl_type {
bool contains_sampler() const;
/**
+ * Get the Mesa texture target index for a sampler type.
+ */
+ gl_texture_index sampler_index() const;
+
+ /**
* Query whether or not a type is an array
*/
bool is_array() const