panfrost: Preprocess shaders at CSO create time
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 7 Feb 2023 05:15:23 +0000 (00:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Mar 2023 23:53:46 +0000 (23:53 +0000)
commitc65a9be421cd4a338939e29e9dca1d8f81f165ac
tree4a3434c08426a9b45850f659047028e02e673c51
parent683d1b60785f2b33466964124e7e419fb05331d8
panfrost: Preprocess shaders at CSO create time

Now the only passes that depend on the shader key can run late, so we can
preprocess ahead-of-time once and throw away the original shader. This reduces
the cost of shader variants, as well as deduplicates some lowering for
transform feedback shaders.

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/pan_context.h
src/gallium/drivers/panfrost/pan_shader.c
src/panfrost/compiler/bifrost_compile.c
src/panfrost/midgard/midgard_compile.c