More Old GLSL Code Is Gutted From Mesa 22.2

Written by Michael Larabel in Mesa on 6 June 2022 at 05:18 AM EDT. 6 Comments
It's not only the Linux kernel that's been seeing some spring cleaning but Mesa developers have also been quite busy on working to remove some old, poorly maintained code from their open-source 3D driver components.

Last month was the big removal of the old GLSL to TGSI path with now the in-tree Mesa drivers are always going through NIR... And in the less than actively maintained drivers, converting back to TGSI IR for driver consumption if not actively having a NIR back-end. But at least now NIR is used everywhere and can leverage more common optimizations and better code maintenance.

Merged this weekend was another improvement to Mesa that frees up more than one thousand lines of code and improves the state of affairs for older drivers. Timothy Arceri has switched all Mesa drivers to only using the NIR loop unroller and in the end deletes the old GLSL IR loop unrolling code.

Arceri summed up the situation as:
The old GLSL IR unrolling code is known to be buggy and is also very slow to run.

At this point it seems some drivers were either using both without realizing the problems the old code could cause or in some cases not using the NIR unroller at all without realising, as they called the nir unroller in their backend optimisation loop but never set the iteration limit meaning it did nothing.

The month old merge request landed this weekend and deletes 1,903 lines of code while adding just 129 lines. This affects the VMware SVGA driver, Nouveau NV30/NV50/NVC0, Lima for early Arm Mali graphics, and Freedreno drivers as well as removing the now unused GLSL IR loop unrolling code from core Mesa code.

Old graphics cards long dropped by their official vendor drivers continue to see improvements with the open-source Mesa 3D code.

This recent code cleaning and a lot more feature work will all be found in Mesa 22.2 due for release in August.
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