Valve Funds Glassy Mesa Development For Better Driver Performance

Glassy Mesa is an experimental project using LunarGLASS for plugging LLVM into Mesa for shader compilation and run-time improvements. LunarGLASS originated back in 2010 as using LLVM IR as the base intermediate representation for the shader and kernel compiler stack. LunarGLASS has performance potential via taking advantage of LLVM's many optimization passes.
In its modern form, LunarGLASS is using the Glslang front-end and the LLVM compiler with additional modifications for making LLVM a worthwhile approach for shader compilation. This code replaces Mesa's existing parser and middl-end optimization layer. This "Glassy Mesa" approach allows any Mesa back-end that can take Mesa GLSL IR as input as beneficial to this technology, with the main driver under the microscope being Intel's i965 DRI driver and most testing being done form Haswell hardware.
In terms of the current state of Glassy Mesa, "Glassy Mesa has progressed to the point of running a trace from the game Left 4 Dead 2. Two different frames from this trace were 'randomly' chosen and integrated into a looping APITrace run to allow for FPS measurements on i965 Haswell. These measurements showed 15% and 22% decreases in frame time for the Glassy stack over the Classic stack, with the most complex frame showing the most improvement. Static cycle times gathered from the scheduler for all L4D2 shaders for both the Glassy and Classic stacks corroborate the improvements seen. While these results are by no means conclusive, they do suggest that this approach is promising and further development and study would be worthwhile."
The current state of the Glassy Mesa Git branch is still deemed a ways from being functionally complete and fully performant. Glassy Mesa has been worked on by one employee of LunarG for the past ten weeks via work contracted by Valve Software.
While this code is still under development and its ultimate fate is unknown (LunarG has told me Valve doesn't know yet whether it will ultimately ship with SteamOS or Steam Machines, etc), the code is available via this Valve Software SteamOS Mesa branch. More information on the LLVM-based Glassy Mesa can be found via LunarG.com and this fresh slide deck.
51 Comments