[Mesa-dev] [PATCH] nir: add lowering for idiv/udiv/umod

Matt Turner mattst88 at gmail.com
Fri Apr 3 09:51:18 PDT 2015


On Fri, Apr 3, 2015 at 8:21 AM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> Based on the algo from NV50LegalizeSSA::handleDIV() and handleMOD().
> See also trans_idiv() in freedreno/ir3/ir3_compiler.c (which was an
> adaptation of the nv50 code from Ilia Mirkin).
>
> Also, including a py script that implements the same algo with numpy,
> based on something written by Ilia (and beaten on with a hammer a bit
> by me).
>
> I've tested this on i965 hacked up to insert the idiv lowering pass.
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
>  src/glsl/Makefile.sources     |   1 +
>  src/glsl/nir/div-lowering.py  |  75 ++++++++++++++++++++

I have no idea if it's valuable to include this file in Mesa (sort of
doubt it is?), but if it is it needs to be included in
src/glsl/Makefile.am's EXTRA_DIST. It also needs a license header.


More information about the mesa-dev mailing list