On Sun, Apr 04, 2010 at 01:09:51AM +0200, Marek Olšák wrote:
> 
> Since Nicolai has already implemented the branch emulation and some other
> optimizations, it would be nice to take over his work. I tried to use the
> branch emulation on vertex shaders and it did not work correctly, I guess it
> needs little fixing. See this branch in his repo:
> http://cgit.freedesktop.org/~nh/mesa/log/?h=r300g-glsl<http://cgit.freedesktop.org/%7Enh/mesa/log/?h=r300g-glsl>
> Especially this commit implements exactly what you propose (see comments in
> the code):
> http://cgit.freedesktop.org/~nh/mesa/commit/?h=r300g-glsl&id=71c8d4c745da23b0d4f3974353b19fad89818d7f<http://cgit.freedesktop.org/%7Enh/mesa/commit/?h=r300g-glsl&id=71c8d4c745da23b0d4f3974353b19fad89818d7f>
> 
> Reusing this code for Gallium seems more reasonable to me than reinventing
> the wheel and doing basically the same thing elsewhere. I recommend
> implementing a TGSI backend in the r300 compiler, which will make possible
> using it with TGSI shaders. So basically a TGSI shader would be converted to
> the RC representation the way it's done in r300g right now, and code for
> converting RC -> hw code would get replaced by conversion RC -> TGSI. Both
> RC and TGSI are very similar so it'll be pretty straightforward. With a TGSI
> backend, another step would be to make a nice hw-independent and
> configurable interface on top of it which should go to util. So far it's
> simple, now comes some real work: fixing the branch emulation and continuing
> from (2) in your list.

I am not sure if I follow you here, so let me know if I am understanding
this correctly.  What you are suggesting is to take Nicolai's branch,
which right now does TGSI -> RC -> Branch Emulation in RC -> hw code and
instead of converting from RC to hw code convert from RC back into TGSI.
Then, pull the TGSI -> RC -> Branch Emulation in RC -> TGSI path out of
the r300 compiler and place it in gallium/auxillary/util so it can be used
by other Gallium drivers that want to emulate branches.  Is this correct?

-Tom

------------------------------------------------------------------------------
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