It can be useful for other drivers too. I'd like to use it in RADV eventually.
Side note, the original version of nir_tess_levels_defined_in_all_invocations was added in this patch: 2832bc97 and authored by @tarceri
nir_tess_levels_defined_in_all_invocations