From b78c3375904c0455f2e426f5569d713db3828583 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Mon, 15 Jun 2020 02:35:20 +0200 Subject: [PATCH] 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: --- src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.30.2