nir: Add Mali load_output taking converison
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 6 Feb 2023 15:49:32 +0000 (10:49 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Mar 2023 23:53:45 +0000 (23:53 +0000)
commit47ed0b41be03a1a98eeeb8422fc0d8b5f0efcb60
treeeabc1b08baed05d3bd5047775bee98222d2ce95b
parent60bfc4deb911d83932bc675f7e2fcd85a44213a6
nir: Add Mali load_output taking converison

Mali's LD_TILE instruction (mapping to NIR's load_output) requires a "conversion
descriptor" specifying how to convert from the register foramt to the tilebuffer
format. To implement framebuffer fetch on OpenGL without shader variants, we
generate these descriptors in the driver and pass them in a uniform. However, to
comply with the Ekstrand Rule, we can't have magically materialized system
values -- they should come only from the NIR where the driver can lower as it
pleases (e.g. PanVK can lower to a constant because it knows the framebuffer
format at pipeline create time). Add intrinsics to model this.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906>
src/compiler/nir/nir_intrinsics.py