Mesa Softpipe Set To See Better Performance, Introducing New NIR-To-TGSI Path
Mesa Gallium3D is close to seeing a major change in their intermediate representation path for drivers consuming Gallium's TGSI rather than NIR directly. Eric Anholt has been working on a NIR-to-TGSI path so that drivers still relying on TGSI can benefit from the NIR optimization paths and improvements while ultimately hoping to eliminate the existing GLSL-to-TGSI code-path currently relied upon by these drivers.
While Gallium3D's Softpipe is much slower than LLVMpipe as an OpenGL software rasterizer, in employing the NIR-to-TGSI path for Softpipe provides a ~10% speed-up while allowing more OpenGL regression tests to pass for this driver. So that alone is a win but this NIR-to-TGSI path can also be beneficial elsewhere and for cleaning up and ultimately eliminating the GLSL-to-TGSI and Mesa-to-TGSI paths currently relied upon.
Anholt is also hoping for the old Intel i915g driver to begin making use of the NIR-to-TGSI path too, which would allow it to compile more programs than currently enabled. The end goal is to rely upon NIR-to-TGSI for all TGSI-consuming Gallium3D drivers. Granted, the prominent Gallium3D drivers are already supporting NIR themselves but this pass at least provides some love to these other drivers and cleaning up a lot of old code in the process. Basically allowing NIR to be the central focus with this new path allowing translation from NIR to TGSI for those drivers not directly consuming NIR.
Besides cleaner code, going through NIR means more IR optimizations than present. Anholt mentioned that he's seen the NIR-to-TGSI path help in "reduce instruction count massively" across compute, geometry, and UBO-loading shaders even in more trivial OpenGL shaders.
This merge request is what Eric Anholt is hoping more Mesa developers will get around to merging soon for introducing the NIR-to-TGSI path and allowing Softpipe to make use of it.
While Gallium3D's Softpipe is much slower than LLVMpipe as an OpenGL software rasterizer, in employing the NIR-to-TGSI path for Softpipe provides a ~10% speed-up while allowing more OpenGL regression tests to pass for this driver. So that alone is a win but this NIR-to-TGSI path can also be beneficial elsewhere and for cleaning up and ultimately eliminating the GLSL-to-TGSI and Mesa-to-TGSI paths currently relied upon.
Anholt is also hoping for the old Intel i915g driver to begin making use of the NIR-to-TGSI path too, which would allow it to compile more programs than currently enabled. The end goal is to rely upon NIR-to-TGSI for all TGSI-consuming Gallium3D drivers. Granted, the prominent Gallium3D drivers are already supporting NIR themselves but this pass at least provides some love to these other drivers and cleaning up a lot of old code in the process. Basically allowing NIR to be the central focus with this new path allowing translation from NIR to TGSI for those drivers not directly consuming NIR.
Besides cleaner code, going through NIR means more IR optimizations than present. Anholt mentioned that he's seen the NIR-to-TGSI path help in "reduce instruction count massively" across compute, geometry, and UBO-loading shaders even in more trivial OpenGL shaders.
This merge request is what Eric Anholt is hoping more Mesa developers will get around to merging soon for introducing the NIR-to-TGSI path and allowing Softpipe to make use of it.
2 Comments