nir_lower_clip_halfz
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.
Edited by Erik Faye-Lund