[Mesa-dev] [PATCH] spirv: replace assert() with unreachable()

Timothy Arceri timothy.arceri at collabora.com
Tue Oct 4 00:25:25 UTC 2016


This fixes an uninitialized warning for is_vertex_input.
---
 src/compiler/spirv/vtn_variables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 43bb3bc..f431c6f 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1054,7 +1054,7 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
          is_vertex_input = false;
          location += VARYING_SLOT_VAR0;
       } else {
-         assert(!"Location must be on input or output variable");
+         unreachable("Location must be on input or output variable");
       }
 
       if (vtn_var->var) {
-- 
2.7.4



More information about the mesa-dev mailing list