[Mesa-dev] [PATCH 3/4] glsl: Add method glsl_type::is_signed_vector()
Chad Versace
chad at chad-versace.us
Thu Oct 7 16:34:47 PDT 2010
From: Chad Versace <chad at chad-versace.us>
---
src/glsl/glsl_types.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index dccab0a..da38d48 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -249,6 +249,15 @@ struct glsl_type {
}
/**
+ * \brief Query whether or not a type is a vector
+ */
+ bool is_integer_vector() const
+ {
+ return is_vector()
+ and (base_type == GLSL_TYPE_INT or base_type == GLSL_TYPE_UINT);
+ }
+
+ /**
* Query whether or not a type is a matrix
*/
bool is_matrix() const
--
1.7.1
More information about the mesa-dev
mailing list