By now most of you probably saw that we put up the source code for the OpenGL 2.0 compiler on our website. See http://www.3dlabs.com/support/developer/ogl2/sourcecode/index.htm if you want to download it.
The OpenGL 2.0 compiler we posted will parse the source of an OpenGL 2.0 vertex or fragment program, convert it into a high level intermediate format, and then call a back-end. This back-end is meant to be filled out by IHVs to generate object code that fits their specific hardware. The back-end included in this project traverses the intermediate format, and prints out what it finds. It is there just as a quick example. For more details take a look at the readme, and the code itself of course.
Now here is your challenge. We would love to see a back-end that generates DirectX 8.1 code, as well as code for NV_vertex_program and the new ARB_vertex_program (still under discussion by the ARB). This generated DirectX or vertex_program code can then be run on any compatible device. We think it very important for OpenGL 2.0 to have the shading language be compatible with as many different targets as possible. This will help spur shader development, proof that the OpenGL2 shading language is robust and complete, and that the code we have provided indeed does help others develop their OpenGL 2.0 implementation.
Of course DirectX8.1 and the vertex_program extensions do not support some features the OpenGL 2.0 shading language has. Like, for example, loops and function calls. That is quite OK, try to implement as much as possible for the target. If you’re interested in starting such a project, please let the development community and us know you’re doing this. It could be a good idea to make this a sourceforge project, for example.
If you’re reading this and work for an IHV, you should be taking a close look at what we’ve provided. If at all possible please share your experiences with how the OpenGL2 shading language maps onto your hardware with the ARB.
Have fun playing with it!