*/
bool has_auxiliary_storage() const;
- /**
- * \brief Return string representation of interpolation qualifier.
- *
- * If an interpolation qualifier is present, then return that qualifier's
- * string representation. Otherwise, return null. For example, if the
- * noperspective bit is set, then this returns "noperspective".
- *
- * If multiple interpolation qualifiers are somehow present, then the
- * returned string is undefined but not null.
- */
- const char *interpolation_string() const;
-
bool merge_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
const ast_type_qualifier &q,
&& this->type->qualifier.has_interpolation()
&& this->type->qualifier.flags.q.varying) {
- const char *i = this->type->qualifier.interpolation_string();
- assert(i != NULL);
+ const char *i = interpolation_string(var->data.interpolation);
const char *s;
if (this->type->qualifier.flags.q.centroid)
s = "centroid varying";
if (state->is_version(130, 300)
&& this->type->qualifier.has_interpolation()) {
- const char *i = this->type->qualifier.interpolation_string();
- assert(i != NULL);
-
+ const char *i = interpolation_string(var->data.interpolation);
switch (state->stage) {
case MESA_SHADER_VERTEX:
if (this->type->qualifier.flags.q.in) {
|| this->flags.q.patch;
}
-const char*
-ast_type_qualifier::interpolation_string() const
-{
- if (this->flags.q.smooth)
- return "smooth";
- else if (this->flags.q.flat)
- return "flat";
- else if (this->flags.q.noperspective)
- return "noperspective";
- else
- return NULL;
-}
-
/**
* This function merges both duplicate identifies within a single layout and
* multiple layout qualifiers on a single variable declaration. The