}
+const char *
+ir_variable::interpolation_string() const
+{
+ if (!this->shader_in && !this->shader_out)
+ return "";
+
+ switch (this->interpolation) {
+ case ir_var_smooth: return "smooth";
+ case ir_var_flat: return "flat";
+ case ir_var_noperspective: return "noperspective";
+ }
+
+ assert(!"Should not get here.");
+ return "";
+}
+
+
ir_function_signature::ir_function_signature(const glsl_type *return_type)
: return_type(return_type), is_defined(false)
{
return var;
}
+ /**
+ * Get the string value for the interpolation qualifier
+ *
+ * \return
+ * If none of \c shader_in or \c shader_out is set, an empty string will
+ * be returned. Otherwise the string that would be used in a shader to
+ * specify \c mode will be returned.
+ */
+ const char *interpolation_string() const;
+
const char *name;
/**