From: Karol Herbst Date: Mon, 15 Jun 2020 00:35:20 +0000 (+0200) Subject: nv50/ir/print: add missing VIEWPORT_MASK handling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b78c3375904c0455f2e426f5569d713db3828583;p=mesa.git nv50/ir/print: add missing VIEWPORT_MASK handling Also add an STATIC_ASSERT so we catch those issues automatically. Signed-off-by: Karol Herbst Reviewed-by: Ilia Mirkin Part-of: --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp index ce0d2507dc1..3381133dce4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp @@ -297,7 +297,7 @@ static const char *CondCodeStr[] = "o" }; -static const char *SemanticStr[SV_LAST + 1] = +static const char *SemanticStr[] = { "POSITION", "VERTEX_ID", @@ -307,6 +307,7 @@ static const char *SemanticStr[SV_LAST + 1] = "VERTEX_COUNT", "LAYER", "VIEWPORT_INDEX", + "VIEWPORT_MASK", "Y_DIR", "FACE", "POINT_SIZE", @@ -517,6 +518,8 @@ int Symbol::print(char *buf, size_t size, DataType ty) const 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;