mesa: optimize set_varying_vp_inputs by precomputing the conditions
set_varying_vp_inputs is called every draw call, which checks
_Maintain*Program. Let's move that checking out of there.
This adds a new flag that determines whether set_varying_vp_inputs
should do anything.
All code that changes _Maintain*Program must now reinitialize the new
flag. This is done by new function _mesa_reset_vertex_processing_mode.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>