glsl: Update struct processing to use num_elements rather than length
glsl: fix up type