de86641d3f
Introduce a varying load count pass to get the maximum amount of varying loads from a fragment shader (prior to optimization passes), in order to only allocate as many Attribute Descriptors as required. This will generally lead to smaller buffers in SRT0 for fragment shaders. As the amount of ADs is now dynamic based on the shader, we need to lower varying loads early for fragment shaders in v9+, as the amount of ADs will determine the offset for dummy_sampler, required during nir_lower_descriptors. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>