[Mesa-dev] [PATCH 2/6] nir: Implement a Mesa IR -> NIR translator.

Eric Anholt eric at anholt.net
Tue Mar 24 17:26:22 PDT 2015


Kenneth Graunke <kenneth at whitecape.org> writes:

> Shamelessly ripped off from Eric Anholt's tgsi_to_nir pass.
>
> Not compiled on SCons, like the rest of NIR.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

Nice.  I think at some point we'll want a lowering pass for texture
projection.  The recommendation to do fsub in algebraic instead of i965
sounded good.  The use of nir variables here also looks way less
unpleasant than my first interaction with them was, so I may take a look
at it again for my pass.

This patch is:

Reviewed-by: Eric Anholt <eric at anholt.net>

Possible improvement: ptn_imm_f()/d() could get a scalar value instead of a
vector.  I found that this was a win (now that nir_builder can handle
scalars mixed with vectors reasonably).  Similarly, ttn_channel()
returning a scalar helped.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150324/3139d9f8/attachment.sig>


More information about the mesa-dev mailing list