Add glsl_type::is_record query
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 10 Jun 2010 00:17:47 +0000 (17:17 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 11 Jun 2010 20:51:42 +0000 (13:51 -0700)
glsl_types.h

index 22df13b..823897d 100644 (file)
@@ -293,6 +293,14 @@ struct glsl_type {
    }
 
    /**
+    * 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.
     */
    bool is_void() const