shader_has_one_variant should be set for most GLES drivers
If these shader_has_one_variant
expressions are satisfied, mesa/st can use a faster path https://gitlab.freedesktop.org/mesa/mesa/-/blob/e29001d0e75bee2d5d950548c1a19625ff4efeb0/src/mesa/state_tracker/st_context.c#L708-735
We have many drivers (like Panfrost and Asahi) that do not qualify for this fast path, because they need some of these features lowered (like alpha testing). However, in OpenGL ES 2 or 3, most of these lowered features don't exist -- there is no alpha testing in GLES, for example. So the drivers could qualify for the fast path for GLES contexts, just not desktop GL contexts.
This should be fixed to improve shader binding performance for GLES drivers, by checking the API when setting the various lower_
flags or when calculating the shader_has_one_variant
expression.