panfrost: Add NIR-based sysval lowering pass
authorAlyssa Rosenzweig <alyssa@collabora.com>
Sat, 11 Feb 2023 02:21:12 +0000 (21:21 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Mar 2023 23:53:46 +0000 (23:53 +0000)
commit455a76f10a0c04a3262fa78f7b02f19dc39bd661
tree7fbb4b3fa19cb374aa30be51e790a10ff4b99cb5
parent3ec9b183327d2ccf7bda666b3a370e6b12053291
panfrost: Add NIR-based sysval lowering pass

Add a NIR pass to lower all the sysvals seen in the GL driver to load_ubo
intrinsics. These load_ubo intrinsics will be pushed to uniforms by the backend
compiler as usual. This will let us remove all sysval handling from the backend
compilers.

This is a direct NIR port of the existing pan_sysvals.c infrastructure and the
consumers in the Midgard/Bifrost compilers. It aims to be bug-for-bug compatible
to ease bisection.

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/gallium/drivers/panfrost/meson.build
src/gallium/drivers/panfrost/pan_context.h
src/gallium/drivers/panfrost/pan_nir_lower_sysvals.c [new file with mode: 0644]