diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-09 15:58:52 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-09 15:58:52 -0800 |
commit | fce1150156edc8b51f5cf077679c0fdb5d582aba (patch) | |
tree | b30b302d97103b30ad794816327d58c7b5daf2c4 /glsl_types.h | |
parent | a2dd22fb194bdffa14a2466ae5667f3be63430d3 (diff) |
Convert is_glsl_type_matrix to glsl_type::is_matrix
Diffstat (limited to 'glsl_types.h')
-rw-r--r-- | glsl_types.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/glsl_types.h b/glsl_types.h index 2b66016..f26dcd6 100644 --- a/glsl_types.h +++ b/glsl_types.h @@ -156,11 +156,16 @@ struct glsl_type { && (base_type >= GLSL_TYPE_UINT) && (base_type <= GLSL_TYPE_BOOL); } -}; -#define is_glsl_type_matrix(t) \ - (((t)->matrix_rows > 0) \ - && ((t)->base_type == GLSL_TYPE_FLOAT)) /* GLSL only has float matrices. */ + /** + * Query whether or not a type is a matrix + */ + bool is_matrix() const + { + /* GLSL only has float matrices. */ + return (matrix_rows > 0) && (base_type == GLSL_TYPE_FLOAT); + } +}; struct glsl_struct_field { const struct glsl_type *type; |