glsl: calculate TOP_LEVEL_ARRAY_SIZE and STRIDE when adding resources