Oliver McFadden wrote: > On 2/22/07, Brian Paul <[EMAIL PROTECTED]> wrote: >> 2. A stand-alone GLSL compiler. At XDC, Dave Reveman mentioned that it >> would be useful for him to have a tool to convert shaders into low-level >> GPU programs, like those of GL_ARB_fragment_program. It occured to me >> that it would be possible to write a Mesa driver (an executable, >> actually) that would just compile shaders and emit GPU programs. So, I >> wrote a driver to do just that. It's also described in the >> docs/shading.html file. > > I'd also find this very useful, too. It's nice to be able to prototype > shaders > in GLSL quickly, then convert to ARB fragment and vertex programs to get > finer > control and manual optimization. > > If you plan to implement optimization into the compiler, which I'm sure > you do, > or have done already, then it would be a good idea to include an option to > disable optimization, or an optimization level option (like gcc) so that > it's > still possible to produce readable output from the stand alone compiler.
There's presently no control over optimization level. I have a few #ifdefs in the compiler that I occasionally use for debugging, but I'd rather not expose them as options right now. The readability of the GPU programs isn't too bad. I encourage people to try it out and see. There's lots of room for improvement in the formatting of the GPU programs which are emitted. The syntax is usually not 100% legal and the programs require hand-editing before they can be fed back into glProgramStringARB(). That's an area I'll probably leave to others to work on. -Brian ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
