This reduces the constant buffer size by eliminating unused elements because it's no longer a uniform array that the compiler can't split.
This looks silly, but there is no other way because all elements must be globally declared, which means they can't be generated by a loop.
0c77190b312 glsl: split gl_CurrentAttribFragMESA into elements
src/compiler/glsl/builtin_variables.cpp | 82 +++++++++++++++++++++++++++++++--
src/mesa/main/ff_fragment_shader.cpp | 11 ++---
2 files changed, 82 insertions(+), 11 deletions(-)