Mesa 22.2 Lands The Big Removal Of Old GLSL-To-TGSI Path, Now Always Going Through NIR

Written by Michael Larabel in Mesa on 5 May 2022 at 07:50 PM EDT. 5 Comments
Emma Anholt's perseverance the past year has paid off in freeing Mesa of the "glsl_to_tgsi" function with now all Mesa drivers going the route of from GLSL to the NIR intermediate representation. For Mesa drivers lacking native NIR consumption, there is then the NIR-to-TGSI path for going back to that traditional Gallium3D IR.

This removal of the old GLSL-to-TGSI code removes a lot of outdated code and helps fix bugs and better performance with now going through the modern NIR intermediate representation instead of the smaller, older drivers still relying on a straight to TGSI code path. NIR has natively already been supported by the bigger, modern drivers from Intel, AMD Radeon, and others.

Emma Anholt as part of this work has led the effort to move drivers to handling NIR such as Nouveau NIR by default, Virgl usage, and other NIR-to-TGSI in the other old drivers.

Merged today is the year-old merge request for replacing GLSL-to-TGSI with the GLSL-to-NIR and NIR-to-TGSI calls. Immediately this lightens up the Mesa code-base by over 22k lines of code while using the new code path tends to be better fixes, sometimes better performance, and better code maintainability.

Kudos to Emma Anholt for leading this effort in this big step forward for Mesa modernization.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week