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

Jason Ekstrand jason at jlekstrand.net
Tue Oct 4 04:05:07 UTC 2016


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

On Mon, Oct 3, 2016 at 5:25 PM, Timothy Arceri <timothy.arceri at collabora.com
> wrote:

> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161003/337e9a53/attachment.html>


More information about the mesa-dev mailing list