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

Jason Ekstrand jason at jlekstrand.net
Sat Mar 28 05:26:17 PDT 2015


On Mar 27, 2015 11:34 PM, "Ilia Mirkin" <imirkin at alum.mit.edu> wrote:
>
> 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.

Yes on both.  With that,
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

> >     }
> >  }
> > --
> > 2.3.4
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150328/c6c66b78/attachment-0001.html>


More information about the mesa-dev mailing list