On Thu, Mar 17, 2016 at 10:45 AM, Matt Turner <matts...@gmail.com> wrote:

> On Thu, Mar 17, 2016 at 10:21 AM, Jason Ekstrand <ja...@jlekstrand.net>
> wrote:
> > NIR already has this optimization and it can do much better than the
> little
> > peephole in the backend.
> >
> > No shader-db change on Broadwell.
> > ---
> >  src/mesa/drivers/dri/i965/brw_fs.cpp | 11 -----------
> >  1 file changed, 11 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp
> b/src/mesa/drivers/dri/i965/brw_fs.cpp
> > index 86d2bd9..ba6ae59 100644
> > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> > @@ -2274,17 +2274,6 @@ fs_visitor::opt_algebraic()
> >              progress = true;
> >           }
> >           break;
> > -      case SHADER_OPCODE_RCP: {
> > -         fs_inst *prev = (fs_inst *)inst->prev;
> > -         if (prev->opcode == SHADER_OPCODE_SQRT) {
> > -            if (inst->src[0].equals(prev->dst)) {
> > -               inst->opcode = SHADER_OPCODE_RSQ;
> > -               inst->src[0] = prev->src[0];
> > -               progress = true;
> > -            }
> > -         }
> > -         break;
> > -      }
>
> Do this in the vec4 backend as well, and with no shader-db regressions on
> HSW:
>

Do you want them in the same patch?  The patch that disables float
opt_algebraic in vec4 does so with 0 shader-db regressions on haswell and
deletes the RCP+SQRT optimization.  Seems nicer to put them together.
--Jason


> Reviewed-by: Matt Turner <matts...@gmail.com>
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to