Also add an STATIC_ASSERT so we catch those issues automatically.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5512>
"o"
};
-static const char *SemanticStr[SV_LAST + 1] =
+static const char *SemanticStr[] =
{
"POSITION",
"VERTEX_ID",
"VERTEX_COUNT",
"LAYER",
"VIEWPORT_INDEX",
+ "VIEWPORT_MASK",
"Y_DIR",
"FACE",
"POINT_SIZE",
int Symbol::print(char *buf, size_t size,
Value *rel, Value *dimRel, DataType ty) const
{
+ STATIC_ASSERT(ARRAY_SIZE(SemanticStr) == SV_LAST + 1);
+
size_t pos = 0;
char c;