[Mesa-dev] [PATCH 1/5] nir: add support for counting AoA uniforms in nir_shader_gather_info()

Timothy Arceri timothy.arceri at collabora.com
Thu Oct 27 09:01:53 UTC 2016


---
 src/compiler/nir/nir_gather_info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index e5cedd9..7d349d5 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -297,8 +297,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)) {
-- 
2.7.4



More information about the mesa-dev mailing list