tu: Create singleton "empty" shaders
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 4 Sep 2023 15:54:35 +0000 (17:54 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 19:03:56 +0000 (19:03 +0000)
commit0f022c3076ee03eff309f98aefcae125140a4825
tree046326ddae533d7b3f85ed66bd963b5d269c996b
parent1020cf8a825c252ed920ea9fc65a52944e624174
tu: Create singleton "empty" shaders

The most important of these is the empty FS, which should cut down on
time spent in the compiler when we fast-link a pipeline where there is
only a library with the VS and no library with the empty FS. Source
engine is known to do this.

This is also necessary for shader objects where the "empty" shaders are
never created up-front. We will use these when a NULL shader is bound.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25276>
src/freedreno/vulkan/tu_device.cc
src/freedreno/vulkan/tu_device.h
src/freedreno/vulkan/tu_pipeline.cc
src/freedreno/vulkan/tu_shader.cc
src/freedreno/vulkan/tu_shader.h