Convert GLSL IR to NIR at compilation stage rather than linker stage
Recently we have been dropping a number of GLSL IR optimisation passes in favour of NIR passes for obvious reasons. However there is one major issue with doing this that we should attempt to address at some stage.
As can be seen in commit 64b8c86d applications can sometimes load all shaders into memory compile them and then never free them. The footprint from the shaders can be in the 100s of megabytes and this is likely growing as we remove more GLSL IR optimisations. I believe this is what we are seeing in #8734 also.
The ideal solution is to convert to NIR at the end of a GL shader compilation call and run some NIR optimisations then, rather than converting to NIR at the linker stage. There is likely to be a number of GLSL link time error checking requirements that will make this difficult as NIR often wants us to lower things first, but it seems like a worthy target.