[Mesa-dev] [PATCH v2] nir: fix assert for wildcard pairs
Eduardo Lima Mitev
elima at igalia.com
Thu May 5 07:57:39 UTC 2016
On 05/05/2016 04:37 AM, Thomas H.P. Andersen wrote:
>
>
> On Wed, May 4, 2016 at 7:46 AM, Eduardo Lima Mitev <elima at igalia.com
> <mailto:elima at igalia.com>> wrote:
>
> Good catch!
>
> Reviewed-by: Eduardo Lima Mitev <elima at igalia.com
> <mailto:elima at igalia.com>>
>
>
> Thanks! I do not have commit access. Can I ask you to push?
>
Sure! Pushed this and the other 2 that I reviewed in your other series.
Be aware that this one remains unreviewed, so not merged:
[PATCH 1/3] coccinelle: remove null check before free
cheers,
Eduardo
>
> On 05/04/2016 05:48 AM, Thomas Hindoe Paaboel Andersen wrote:
> > The assert was null checking dest_arr_parent twice. The intention
> > seems to be to check both dest_ and src_.
> >
> > Added in d3636da9
> > ---
> > v2:
> > Fix the assert rather than checking both in the if(). Hat tip to
> Ilia.
> > src/compiler/nir/nir_lower_var_copies.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/compiler/nir/nir_lower_var_copies.c
> b/src/compiler/nir/nir_lower_var_copies.c
> > index 707d5af..1a7e2ee 100644
> > --- a/src/compiler/nir/nir_lower_var_copies.c
> > +++ b/src/compiler/nir/nir_lower_var_copies.c
> > @@ -85,7 +85,7 @@ emit_copy_load_store(nir_intrinsic_instr
> *copy_instr,
> >
> > if (src_arr_parent || dest_arr_parent) {
> > /* Wildcards had better come in matched pairs */
> > - assert(dest_arr_parent && dest_arr_parent);
> > + assert(src_arr_parent && dest_arr_parent);
> >
> > nir_deref_array *src_arr =
> nir_deref_as_array(src_arr_parent->child);
> > nir_deref_array *dest_arr =
> nir_deref_as_array(dest_arr_parent->child);
> >
>
>
More information about the mesa-dev
mailing list