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

Timothy Arceri timothy.arceri at collabora.com
Mon Aug 29 02:13:52 UTC 2016


Fixes uninitialised warning for coord_components.
---
 src/compiler/spirv/spirv_to_nir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index ca404d8..fda38f9 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -1426,7 +1426,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
          coord_components = 3;
          break;
       default:
-         assert("Invalid sampler type");
+         unreachable("Invalid sampler type");
       }
 
       if (is_array && texop != nir_texop_lod)
-- 
2.7.4



More information about the mesa-dev mailing list