AFAICT, the GL and GLSL specs don't say anything about the significance of the order in which shaders are attached to a program object. For example, if there's two vertex shader A and B, it shouldn't matter if they're attached in order A,B or B,A.
This pair of shader tests exercises that. Both pass with Mesa but the "b-a" case fails with NVIDIA.
660a651 Add a new shader attachment/link ordering test.
.../glsl-1.20/linker/link-order-a-b.shader_test | 44 ++++++++++++++++++++
.../glsl-1.20/linker/link-order-b-a.shader_test | 44 ++++++++++++++++++++
2 files changed, 88 insertions(+)
Upstream: cgit.freedesktop.org