nir: Upstream patches from kusma/mesa!83
These are some patches from kusma/mesa!83 (merged) which I've cherry-picked and, painfully, rebased. We should get them landed and avoid more rebase pain.
@jenatali could you please sanity check the cherry-pick? Also there's one patch in there which is currently authored to me but it was extracted from one of yours. An RB would be nice.
Edited by Faith Ekstrand