NIR Has Been Revised As A New IR For Mesa

Written by Michael Larabel in Mesa on 18 December 2014 at 12:30 PM EST. 7 Comments
MESA
Posted to the Mesa mailing list this week was a set of 123 patches that reintroduces NIR as a new IR for Mesa.

The NIR Mesa IR was envisioned and originally developed by Connor Abbott, who was interning at Intel this summer after being a fresh graduate of high school and having already contributed to Lima and other Linux graphics projects.

Jason Ekstrand has picked up work on NIR and sent out the 123 patches this week with its re-introduction. With the 123 patches, the NIR IR is hooked up for the classic Intel driver and isn't enabled by default but requires setting the INTEL_USE_NIR environment variable.

NIR is an SSA-based IR, suports standard GPU operations, the IR integrates standard GLSL concepts, has concepts of registers, and control flow is structured explicitly in the IR. This IR is not based on LLVM. While the Intel driver is only hooked up by this patch series, Eric Anholt has written NIR to TGSI to NIR passes as a separate patch series. These passes would allow Gallium3D drivers to utilize NIR as well with apparent interest from Eric in using NIR for the VC4 Raspberry Pi Gallium3D driver.

The 123 patches can be found on Mesa-dev and is currently being reviewed by other Mesa developers. There's hopes that these patches will make it soon into mainline Mesa given that the NIR usage is hidden behind an environment variable by default.
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