Off-and-on for a couple years (no kidding) I've been working on a branch that
compiles the assembly shaders (e.g.,
GL_ARB_vertex_program
)
to GLSL IR. I even talked about it at XDC
2011. This project has turned
into such an incredible rat's nest of irritation that I can't even believe
it.
All of that asside, the project reached a significant milestone today. I can run retail Doom3 binaries. There are a couple caveats (incorrect rendering, have to disable HiZ on Sandybridge, etc.), but it's still significant progress. The images below are i965 on Mesa 8.0.2 (with HiZ disabled), i965 on my branch (with HiZ disabled), and classic swrast on my branch. At least at the time of this writing, there are some bugs related to separate stencil on Sandybridge that only occur when HiZ is enabled.
Thanks for the link.
So is the plan that I could precompile my shaders (or more likely OpenCL kernels!) to the IR and ship that instead of full GLSL? Could this be integrated with a GCC or LLVM backend for direct use within a program, in a similar way to what Microsoft is doing with their AMP C++ extensions (#pragma __restrict(DirectX11) declarations around DirectCompute kernels)?
DDD