glsl: add helper for counting varyings
[mesa.git] / src / compiler / glsl_types.h
index 4f4cfea1201b02239a19f995e79fcae566815b6c..dd46479755ad804ae1b48eeb5d7acc9657aefbcc 100644 (file)
@@ -326,6 +326,12 @@ struct glsl_type {
     */
    unsigned uniform_locations() const;
 
+   /**
+    * Used to count the number of varyings contained in the type ignoring
+    * innermost array elements.
+    */
+   unsigned varying_count() const;
+
    /**
     * Calculate the number of attribute slots required to hold this type
     *