Returns the type without any arrays.
This will be used in later patches in this series.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Suggested-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
return base_type == GLSL_TYPE_ERROR;
}
+ /**
+ * Get the type stripped of any arrays
+ *
+ * \return
+ * Pointer to the type of elements of the first non-array type for array
+ * types, or pointer to itself for non-array types.
+ */
+ const glsl_type *without_array() const
+ {
+ return this->is_array() ? this->fields.array : this;
+ }
+
/**
* Return the amount of atomic counter storage required for a type.
*/