glsl: add helper for calculating size of AoA