spirv: replace assert with unreachable
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 29 Aug 2016 02:13:52 +0000 (12:13 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Mon, 29 Aug 2016 23:29:26 +0000 (09:29 +1000)
Fixes uninitialised warning for coord_components.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/compiler/spirv/spirv_to_nir.c

index ca404d8beb3b61f06a161240038aa568c0335f70..fda38f91106eda914fa9f4d390b79ea39d2b3c8e 100644 (file)
@@ -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)