glsl: Also track matrix layout information into structures