nir: Usher nir_normalize_cubemap_coords into 2022
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 22 Sep 2022 14:22:03 +0000 (10:22 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 17 Oct 2022 20:46:24 +0000 (20:46 +0000)
commit2c7be4d4212a7b6c50523285b412d5747231323e
treed61deaccb6f1cc03893d2d0c21da32c0557626ec
parentfc5c671e8785c89cf986181e0e3e7fa8742c4dce
nir: Usher nir_normalize_cubemap_coords into 2022

I stumbled upon this old NIR pass (still in use by intel and broadcom)
and noticed how most of the code was NIR boilerplate that we have
helpers for. Rewrite the pass to use all the helpers.

v2: Fix cube map arrays.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18754>
src/compiler/nir/nir_normalize_cubemap_coords.c