There is no Haiku port of Mesa to compile.
Instead, Haiku comes with an OpenGL kit (libGL.so, libglut.so symlink, public GL headers, add-ons API) which use Mesa 7.x (can't remember the extact version):
- libGL.so contains and rely on Mesa GLAPI dispatching code
- libGL.so contains and rely on Mesa GLU implementation (which is SGI's one in fact)
- libGL.so contains and rely on Mesa GLUT implementation (which lacks recent Game extensions as mentioned above)
- libGL.so contains GLRenderer, GLRendererRoster, GLAPIDispatcher and GLView base classes.
The later delegates all the ugly stuffs to a GLRenderer object, which is bound to GLAPIDispatcher (a wrapper object around the mentioned Mesa GLAPI) at GLView init. The GLRendererRoster object manage renderer add-on(s), providing one at GLView's demand.
- Mesa Software Renderer add-on contains and rely the Mesa software rasterizer, wrapped into a GLRenderer object.
- The softpipe renderer add-on from the Galluim3D branch contains and rely on Gallium3D softpipe renderer, wrapped into a GLRenderer object.
Yes, I know, it's overly complex. And consider that it's way more simpler in Haiku implementation than on Linux, where DRM, DRI, DRI2 and X drivers are involved too. For HW 3D support, it will complexify a bit more, for sure.
Optimizing the Mesa software renderer will be hard, as it's already well done since years by Mesa developers. What's lacking is using the threading power, but except the multi-bands branch (which split the rendering in several bands and threads) of latest Mesa versions (not sure it has been merged into trunk yet, though), there is not much to expect here.
Switching to Gallium API (which needs Mesa too) in order to get as free the LLVM-optimized-and-multithreaded soft pipe (dubbed llvmpipe) will give us a far quicker software renderer than currently. But it will be long away still from what kind of performance people and 3D apps are asking today: hardware accelerated 3D. Software renderers are poorman fallback solutions now, pratically useless.
The port of Gallium to Haiku is the way to go no doubt, and is already in progress. It will gives us really useable 3D support. What's lacking is free time and, most probably, a second worker to help Arthur carrying this heavy task. Maybe a GCoS next year, or some HCD (Haiku Coding Drive)...
Switching app_server to use OpenGL is definitively not yet scheduled, and depends on HW 3D support availability. There is no point to start it without.