panfrost: Preprocess shaders in the driver
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 6 Feb 2023 22:23:19 +0000 (17:23 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Mar 2023 23:53:46 +0000 (23:53 +0000)
commitca2042f3592e2c292e7c2423c628ac2728925f72
treee6c514c7862aca3e297f4b26643fd6055f666270
parent2a356cefba1799a0222edc6574d32ee6ef1c77b4
panfrost: Preprocess shaders in the driver

This is a flag-day change to how we compile. We split preprocessing NIR into a
separate step from compiling, giving the driver a chance to apply its own
lowerings on the preprocessed NIR before the final optimization loop. During
that time, the different producers of NIR (panfrost, panvk, blend shaders, blit
shaders...) will be able to (differently) lower system values.

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>
15 files changed:
src/gallium/drivers/panfrost/pan_shader.c
src/panfrost/compiler/bifrost_compile.c
src/panfrost/compiler/bifrost_compile.h
src/panfrost/lib/pan_blend.c
src/panfrost/lib/pan_blend.h
src/panfrost/lib/pan_blitter.c
src/panfrost/lib/pan_indirect_dispatch.c
src/panfrost/lib/pan_shader.c
src/panfrost/lib/pan_shader.h
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_compile.h
src/panfrost/util/pan_ir.h
src/panfrost/vulkan/panvk_vX_meta_clear.c
src/panfrost/vulkan/panvk_vX_meta_copy.c
src/panfrost/vulkan/panvk_vX_shader.c