NIR Has Been Revised 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.
7 Comments