[Mesa-dev] [PATCH] i965: stop counting double outputs twice

Timothy Arceri timothy.arceri at collabora.com
Fri Jul 22 13:21:03 UTC 2016


On Fri, 2016-07-22 at 14:52 +0200, Iago Toral wrote:
> This fixes the crash (and the test), however, it seems to break at
> least two other fp64 tests that go from pass to fail:
> 
> spec/arb_gpu_shader_fp64/execution/explicit-location-gs-fs-vs
> spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations
> 

Thanks, I noticed some regressing just after send this also. I've sent
a new patch out, I'm still running it in jenkins
but I'm confident it should fix this properly this time

> Iago
> 
> On Fri, 2016-07-22 at 22:28 +1000, Timothy Arceri wrote:
> > Since 7f53fead5c we treat every location as using all
> > four components so there is no need for handling doubles
> > as a special case.
> > 
> > This fixes a crash in GL45-CTS.enhanced_layouts.varying_locations
> > where the outputs array would overflow when a double was stored at
> > the max varying location.
> > 
> > Cc: Iago Toral <itoral at igalia.com>
> > ---
> >  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 11 +++--------
> >  1 file changed, 3 insertions(+), 8 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> > b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> > index 50d73eb..5d26018 100644
> > --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> > @@ -67,14 +67,9 @@
> > fs_visitor::nir_setup_single_output_varying(fs_reg
> > *reg,
> >        }
> >     } else {
> >        assert(type->is_scalar() || type->is_vector());
> > -      unsigned num_iter = 1;
> > -      if (type->is_double())
> > -         num_iter = 2;
> > -      for (unsigned count = 0; count < num_iter; count++) {
> > -         this->outputs[*location] = *reg;
> > -         *reg = offset(*reg, bld, 4);
> > -         (*location)++;
> > -      }
> > +      this->outputs[*location] = *reg;
> > +      *reg = offset(*reg, bld, 4);
> > +      (*location)++;
> >     }
> >  }
> >  
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list