Most of the redundancy is temporary, a consequence of the transitions going on now and the associated need to support old and new standards. For years there were just the two steps :
- mesa converts from GLSL to hardware-independent Mesa IR
- HW driver converts from Mesa IR to hardware instructions
The conversion from Mesa IR to TGSI is needed as long as we have both "classic" and Gallium3D drivers but that can go away once (if) all the drivers transition to Gallium3D and whatever the corresponding IR turns out to be. At that point mesa can generate the appropriate IR directly and pass it to the HW driver and we're back to two steps.
The "compiler IR to Mesa IR" step happens because the Intel devs were nice enough to write a new GLSL compiler and make it work for everyone's hardware, not just their own, even though they don't plan to use Mesa IR in the future. My understanding is that the conversion isn't very expensive but as you say it all makes a difference.
You can find our IL specification on the Stream SDK documentation page :
- mesa converts from GLSL to hardware-independent Mesa IR
- HW driver converts from Mesa IR to hardware instructions
The conversion from Mesa IR to TGSI is needed as long as we have both "classic" and Gallium3D drivers but that can go away once (if) all the drivers transition to Gallium3D and whatever the corresponding IR turns out to be. At that point mesa can generate the appropriate IR directly and pass it to the HW driver and we're back to two steps.
The "compiler IR to Mesa IR" step happens because the Intel devs were nice enough to write a new GLSL compiler and make it work for everyone's hardware, not just their own, even though they don't plan to use Mesa IR in the future. My understanding is that the conversion isn't very expensive but as you say it all makes a difference.
You can find our IL specification on the Stream SDK documentation page :
Comment