Mesa (master): spirv: replace assert() with unreachable()

Timothy Arceri tarceri at kemper.freedesktop.org
Tue Oct 4 11:34:00 UTC 2016


Module: Mesa
Branch: master
Commit: 338d3c0b0f9c56e68c31ff542513fb7fa9f1c099
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=338d3c0b0f9c56e68c31ff542513fb7fa9f1c099

Author: Timothy Arceri <timothy.arceri at collabora.com>
Date:   Tue Oct  4 11:25:25 2016 +1100

spirv: replace assert() with unreachable()

This fixes an uninitialized warning for is_vertex_input.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 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 44c65ae..634058c 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) {




More information about the mesa-commit mailing list