nir, gallium: add a pass that converts uniforms to literals
@idr @kwg I think you wanted to see this. The nir commit contains the passes and the gallium commit contains the driver interface. The design is that optimized shader variants have to be generated in gallium drivers to keep that overhead out of common code because of the existing CPU overhead (the GL thread has a much higher overhead than the gallium thread here, so gallium drivers should have plenty of free CPU time if they enable u_threaded_context)
I'm still working on radeonsi support, but there are some performance gains already.
Edited by Marek Olšák