Mesa 22.2 Continues Modernizing With More GLSL IR Code Replaced By NIR
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.