I finally pushed my assembly shader (e.g., GL_ARB_vertex_program) re-work branch today. I've been working on this off-and-on for a couple of months now. I finally realized that my grand plan to rewrite the GLSL compiler was doomed to failure. I just couldn't get enough blocks of time to get it all done. I kept having to work on other things (bug fixes). After each break it took a few days (or more) to figure out what I was working on and get back into it. By the time I got back into it, I had to break away to work on other things. FAIL.

So, now I have a new plan.

The areas where I really want to work are optimizing IR and generating final machine code from IR. Phases 1 and 2 of the asm-shader-rework-1 branch support this. I've rewritten the ARB program parser, that's phase 1. Phase 2 is to add support for some of the later Nvidia layered extensions. These extension expose the full instruction set required to support GLSL. That's where the fun beings.

This is the point, phase 3, where I can start experimenting with IRs. I can bridge from the assembly code to an IR and back. Using the full assembly interfaces I can pick apart bits of complex shaders and dump them into the IR. I expect to go through several revisions of the IR before I move to the next phase. GPUs are really different from CPUs, so I expect that an IR that works well here will be different from, say, what GCC uses. I really need a test bed for experimentation.

I don't want to think about what comes next until I get quite a bit more along. My hope is that the current code base will settle down over the next week or two, and I can merge it into master for the Mesa 7.6 release.