Merged requested to merge kusma/mesa:nir_lower_clip_halfz into master
Both Zink an Etnaviv implements logic to lower clipping semantics from OpenGL-semantics to DirectX/Vulkan semantics (clip_halfz). So let's pull this code out into a helper instead of repeating this.
This is marked as WIP, because it's untested on Etnaviv, as I don't have the hardware. Help with testing would be greatly appreciated.