turnip: Only emit descriptor loads for active stages in the pipeline.
authorEmma Anholt <emma@anholt.net>
Tue, 13 Sep 2022 04:11:14 +0000 (21:11 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Sep 2022 22:19:43 +0000 (22:19 +0000)
commitd862a2ebcbf94374e0ab0bd1c63bc45020a2ecef
treef91e583c4a31f5068709e831bdf3f986d01e27bf
parentf51bbcc8ae8a18fb54a1ecdf85e3c8ec2fdc6b0c
turnip: Only emit descriptor loads for active stages in the pipeline.

zink has a push descriptor template layout that has every possible stage,
which gets used regardless of what stages are in the pipeline.  By
skipping over the unused stages, we cut the CP overhead.

Improves TU_DEBUG=sysmem gfxbench gl_driver2 on zink by 6.57% +/-
0.331143% (n=5).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18562>
src/freedreno/vulkan/tu_pipeline.c