A Mesa Branch Provides GLSL IR To TGSI Translator

Written by Michael Larabel in Mesa on 28 April 2011 at 11:33 AM EDT. 25 Comments
MESA
What's been talked about extensively and for quite a while but not acted upon too much is ridding Mesa of Mesa IR, it's intermediate representation used internally by core Mesa and its drivers. It was also talked about as a possible summer project of replacing Mesa IR with GLSL IR. Now though an individual has begun gutting out Mesa IR and providing a direct GL Shading Language IR to TGSI (the Gallium3D IR) translator.

The work was announced this week on the Mesa mailing list and the code is currently a work in progress but can be found on GitHub. It seeks to replace Mesa IR with this GLSL IR to TGSI translator.

This work will hopefully be a stepping-stone to GLSL 1.30 support for Mesa in Gallium3D as needed by the OpenGL 3.0 specification. "My main objective with this work is to make GLSL 1.30 support feasible on Gallium drivers. From what I understand, it would be difficult or impossible to implement integer-specific opcodes such as shifting and bit masking in Mesa IR, since it only supports floats. TGSI, on the other hand, doesn't have this problem, and already supports most or all of the functionality required by GLSL 1.30."

Competing with this work is LunarGLASS that is replacing Mesa IR and other parts of the stack with LLVM IR and Low-Level Virtual Machine optimizations. This work though hasn't been too popular with upstream developers outside of LunarG. This work is also only available in a Mesa branch.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week