mesa: precompute all valid primitive types at context creation
New variable gl_context::MaxValidPrimMask is set at context creation
and determines the valid primitive types for that context.
The Max prefix indicates that the mask doesn't mask out primitives
disallowed by current states and shaders.
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>