projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e5cd2b
)
Add query to determine whether a type is a sampler
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 23 Mar 2010 22:03:46 +0000
(15:03 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 23 Mar 2010 22:03:46 +0000
(15:03 -0700)
glsl_types.h
patch
|
blob
|
history
diff --git
a/glsl_types.h
b/glsl_types.h
index 57f339a9a6f6cd5ebf4d200aaeb41a81da31055d..b1cd9a9d637117b391ea816dc1c874046bb35812 100644
(file)
--- a/
glsl_types.h
+++ b/
glsl_types.h
@@
-167,6
+167,14
@@
struct glsl_type {
return (matrix_rows > 0) && (base_type == GLSL_TYPE_FLOAT);
}
+ /**
+ * 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.
*/