nir: add support for counting AoA uniforms in nir_shader_gather_info()
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 27 Oct 2016 08:13:05 +0000 (19:13 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 17 Nov 2016 01:52:24 +0000 (12:52 +1100)
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/compiler/nir/nir_gather_info.c

index 63c8a420fdfca967608f0930dffb4189f3d35a44..82452b439a6818f34b39563449c3c6fe90e69143 100644 (file)
@@ -295,8 +295,8 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
       const struct glsl_type *type = var->type;
       unsigned count = 1;
       if (glsl_type_is_array(type)) {
-         count = glsl_get_length(type);
-         type = glsl_get_array_element(type);
+         count = glsl_get_aoa_size(type);
+         type = glsl_without_array(type);
       }
 
       if (glsl_type_is_image(type)) {