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 22df13b07f0e0a94d854d79697d2d95fe6b45594..823897df4ae112948084f6fe8e3cae343e033f8e 100644 (file)
@@ -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.
     */