summaryrefslogtreecommitdiff
path: root/glsl_types.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-23 15:03:46 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-23 15:03:46 -0700
commitcb7d066967b85c52fe15590b56529254516261e7 (patch)
tree984b947110a2a03467082da5c23766f7b73c23bd /glsl_types.h
parent1e5cd2b05b2354006f8e33d20c3535ac2219b573 (diff)
Add query to determine whether a type is a sampler
Diffstat (limited to 'glsl_types.h')
-rw-r--r--glsl_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/glsl_types.h b/glsl_types.h
index 57f339a9a6..b1cd9a9d63 100644
--- a/glsl_types.h
+++ b/glsl_types.h
@@ -168,6 +168,14 @@ struct glsl_type {
}
/**
+ * Query whether or not a type is a sampler
+ */
+ bool is_sampler() const
+ {
+ return base_type == GLSL_TYPE_SAMPLER;
+ }
+
+ /**
* Query whether or not a type is the void type singleton.
*/
bool is_void() const