glsl: Fix input/output structure matching across shader stages