[Mesa-dev] [PATCH] nir: Fix copy and pasted error message in nir_validate.

Ilia Mirkin imirkin at alum.mit.edu
Fri Mar 27 21:33:59 PDT 2015


On Sat, Mar 28, 2015 at 12:23 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> These are nir_cf_nodes, not ALU instructions.
> Also, use unreachable() to preempt said review feedback.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/glsl/nir/nir_validate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c
> index f247ae0..79c23db 100644
> --- a/src/glsl/nir/nir_validate.c
> +++ b/src/glsl/nir/nir_validate.c
> @@ -680,7 +680,7 @@ validate_cf_node(nir_cf_node *node, validate_state *state)
>        break;
>
>     default:
> -      assert(!"Invalid ALU instruction type");
> +      unreachable(!"Invalid CF node type");

unreachable just takes a str, not a condition passed through to an assert.

>        break;

should probably remove the break while you're at it.

>     }
>  }
> --
> 2.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list