On 09/30/2014 03:38 PM, Rob Clark wrote:
From: Rob Clark <[email protected]>

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.

Signed-off-by: Rob Clark <[email protected]>

Hi Rob, a few thoughts:

How about moving this into the src/gallium/auxiliary/tgsi/ directory since this is a very TGSI-specific thing?

I think some of my recent changes to the tgsi_transform code would be helpful, like emit_epilog/prolog() and the various tgsi_transform_opX_inst() helpers.

There's a lot of tricky code trying to determine the exact size of the new shader token buffer. Why not just use a 2x buffer and then realloc to the exact size at the end?

I think the big if/switch statements could be replaced by some kind of table-driven system.

FWIW, I have a two-sided lighting transformation function too that I haven't pushed to master yet.

-Brian


_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to