On Tue, Mar 30, 2010 at 10:26 AM, Nicolai Haehnle <nhaeh...@gmail.com>wrote:

> On Tue, Mar 30, 2010 at 8:13 AM, Marek Olšák <mar...@gmail.com> wrote:
> > Another idea was to convert TGSI to a SSA form. That would make unrolling
> > branches much easier as the Phi function would basically become a linear
> > interpolation, loops and subroutines with conditional return statements
> > might be trickier. The r300 compiler already uses SSA for its
> optimization
> > passes so maybe you wouldn't need to mess with TGSI that much...
>
> Note that my Git repository already contains an implementation of
> branch emulation and some additional optimizations, see here:
> http://cgit.freedesktop.org/~nh/mesa/log/?h=r300g-glsl<http://cgit.freedesktop.org/%7Enh/mesa/log/?h=r300g-glsl>
>
> Shame on me for abandoning it - I should really get around to make
> sure it fits in with recent changes and merge it to master. The main
> problem is that it produces "somewhat" inefficient code. Adding and
> improving peephole and similar optimizations should help tremendously.
>

Well it's either this or nothing so I guess I am not the only one to prefer
to get it merged. ;) However that kinda slightly changes Tom's plan for the
GSoC project.

On a different note, considering that the r300 compiler has basically 2
frontends (Mesa IR and TGSI) and 3 backends (r300 VS & FS, r500 FS), would
it be feasible to add yet another backend - TGSI? That would turn the
compiler into a generic Gallium shader optimizer with the lowering tools it
already has (or will have) and more people would be interested in adding new
features and improvements in it.

-Marek
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to