[Mesa-dev] [PATCH] util: add u_lowering

Eric Anholt eric at anholt.net
Tue Sep 30 15:08:43 PDT 2014


Rob Clark <robdclark at gmail.com> writes:

> From: Rob Clark <robclark at freedesktop.org>
>
> TGSI->TGSI pass, extracted from freedreno.  Currently provides the
> following lower support, to help drivers emulate unsupported opcodes
> or features:
>
> Individual opcodes:
>   DST, XPD, SCS, LRP, FRC, POW, LIT, EXP, LOG, DP4, DP3, DPH,
>   DP2, DP2A
>
> Also supported, although it is up to the driver to manage it's own
> shader variants:
>  + two-sided-color
>  + texture coord saturate (ie. to emulate GL_CLAMP)
>
> All of the lowering operations are opt-in so a driver can pick and
> choose what it wants.

This is very useful to me, as it got me +15 piglit tests, and -70 lines
of code.

I'm not using FRC because I can do it in just as many instructions as my
FLR, and I'm not using LRP because I'm doing the (c + a * (b - c))
version of things, but I'm using all the rest of those opcodes.

I'm not cloning the tokens for shader variants yet, so I'm still doing
my own texcoord clamping.  However, I do want to use the two-side-color
lowering, so I'll probably start cloning for variants, at which point
I'll use the texcoord bits, too.

However, I'd like to see the code first have a commit that's just a raw
copy, so that git log --follow can track where the code came from.  I've
pushed a branch called "robclark-lowering" to my mesa tree if maybe you
want to ack that starting commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140930/c11fa120/attachment.sig>


More information about the mesa-dev mailing list