Nothing actually uses this yet.
v2: Remove >= 0 checks. They'll be handled in later validation.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
*/
unsigned explicit_index:1;
+ /**
+ * Flag set if GL_ARB_shading_language_420pack "binding" layout
+ * qualifier is used.
+ */
+ unsigned explicit_binding:1;
+
/** \name Layout qualifiers for GL_AMD_conservative_depth */
/** \{ */
unsigned depth_any:1;
*/
int index;
+ /**
+ * Binding specified via GL_ARB_shading_language_420pack's "binding" keyword.
+ *
+ * \note
+ * This field is only valid if \c explicit_binding is set.
+ */
+ int binding;
+
/**
* Return true if and only if an interpolation qualifier is present.
*/
|| this->flags.q.row_major
|| this->flags.q.packed
|| this->flags.q.explicit_location
- || this->flags.q.explicit_index;
+ || this->flags.q.explicit_index
+ || this->flags.q.explicit_binding;
}
bool
if (q.flags.q.explicit_index)
this->index = q.index;
+ if (q.flags.q.explicit_binding)
+ this->binding = q.binding;
+
return true;
}
}
}
+ if (state->ARB_shading_language_420pack_enable &&
+ strcmp("binding", $1) == 0) {
+ $$.flags.q.explicit_binding = 1;
+ $$.binding = $3;
+ }
+
/* If the identifier didn't match any known layout identifiers,
* emit an error.
*/