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