st/glsl_to_nir: use nir_shader_gather_info()