Mesa 22.2 Continues Modernizing With More GLSL IR Code Replaced By NIR

Written by Michael Larabel in Mesa on 16 May 2022 at 05:15 AM EDT. 1 Comment
MESA
Mesa developer Timothy Arceri of Valve's Linux graphics driver team has added a NIR varying linker for GLSL.

Arceri's month old merge request was merged overnight for this NIR-based varying linker pass where he was quick to acknowledge "There are only a handful of people who understand the GLSL IR code and the varying linking code is probably the least understood of all. Having this in NIR should allow for better future maintenance."

It's great seeing more of the Mesa code being adapted for modernization purposes and a convergence on getting much of Mesa's internals going through the NIR intermediate representation. The different efforts from weening more drivers off TGSI Gallium IR to replacing portions of code with modern, NIR-based implementations have been panning out well and important for the future maintenance and overall success of the open-source Linux graphics driver stack.

This NIR-based varying linker for GLSL yields better packing, avoids depending upon aging GLSL IR optimizations, and deals better with large amounts of dead inputs/outputs. As Arceri went on to note in his merge request, this NIR-based linker "allows us to disable more of the troublesome, slow and largely unmaintained GLSL IR optimisation passes." Hooray for spring cleaning.

The merge affects around five thousand lines of code for next quarter's Mesa 22.2 release with gutting the now-unused GLSL IR varying linker code carried out as part of this merge.
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