Mesa (master): nv50/ir/print: add missing VIEWPORT_MASK handling
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 22 11:52:39 UTC 2020
Module: Mesa
Branch: master
Commit: b78c3375904c0455f2e426f5569d713db3828583
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b78c3375904c0455f2e426f5569d713db3828583
Author: Karol Herbst <kherbst at redhat.com>
Date: Mon Jun 15 02:35:20 2020 +0200
nv50/ir/print: add missing VIEWPORT_MASK handling
Also add an STATIC_ASSERT so we catch those issues automatically.
Signed-off-by: Karol Herbst <kherbst at redhat.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5512>
---
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;
More information about the mesa-commit
mailing list