projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e7c34b
)
Add is_error and is_void type queries
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 23 Mar 2010 19:28:28 +0000
(12:28 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 23 Mar 2010 19:28:28 +0000
(12:28 -0700)
glsl_types.h
patch
|
blob
|
history
diff --git
a/glsl_types.h
b/glsl_types.h
index 45037b37869b74ac0a65aa3bad99bf762d76bd90..57f339a9a6f6cd5ebf4d200aaeb41a81da31055d 100644
(file)
--- a/
glsl_types.h
+++ b/
glsl_types.h
@@
-166,6
+166,22
@@
struct glsl_type {
/* GLSL only has float matrices. */
return (matrix_rows > 0) && (base_type == GLSL_TYPE_FLOAT);
}
+
+ /**
+ * Query whether or not a type is the void type singleton.
+ */
+ bool is_void() const
+ {
+ return base_type == GLSL_TYPE_VOID;
+ }
+
+ /**
+ * Query whether or not a type is the error type singleton.
+ */
+ bool is_error() const
+ {
+ return base_type == GLSL_TYPE_ERROR;
+ }
};
struct glsl_struct_field {