From 93073551f9fff0df5ad1f65e0f483e6699474b91 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 9 Jun 2010 17:17:47 -0700 Subject: [PATCH] Add glsl_type::is_record query --- glsl_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/glsl_types.h b/glsl_types.h index 22df13b07f0..823897df4ae 100644 --- a/glsl_types.h +++ b/glsl_types.h @@ -292,6 +292,14 @@ struct glsl_type { return base_type == GLSL_TYPE_ARRAY; } + /** + * Query whether or not a type is a record + */ + bool is_record() const + { + return base_type == GLSL_TYPE_STRUCT; + } + /** * Query whether or not a type is the void type singleton. */ -- 2.30.2