OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a24cd5
)
Add glsl_type::is_array and glsl_type::is_float queries
author
Ian Romanick
<ian.d.romanick@intel.com>
Mon, 29 Mar 2010 23:17:15 +0000
(16:17 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Mon, 29 Mar 2010 23:17:15 +0000
(16:17 -0700)
glsl_types.h
patch
|
blob
|
history
diff --git
a/glsl_types.h
b/glsl_types.h
index
68a32ef
..
bb2d6f6
100644
(file)
--- a/
glsl_types.h
+++ b/
glsl_types.h
@@
-224,6
+224,14
@@
struct glsl_type {
}
/**
+ * Query whether or not a type is a float type
+ */
+ bool is_float() const
+ {
+ return base_type == GLSL_TYPE_FLOAT;
+ }
+
+ /**
* Query whether or not a type is a non-array boolean type
*/
bool is_boolean() const
@@
-240,6
+248,14
@@
struct glsl_type {
}
/**
+ * Query whether or not a type is an array
+ */
+ bool is_array() const
+ {
+ return base_type == GLSL_TYPE_ARRAY;
+ }
+
+ /**
* Query whether or not a type is the void type singleton.
*/
bool is_void() const