From f00c5f85b82efe9535b18dbf97c4591fb28aeae6 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 27 Feb 2015 22:43:39 +1100 Subject: [PATCH] glsl: support packing of arrays of arrays Reviewed-by: Ilia Mirkin --- src/glsl/lower_packed_varyings.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp index 2c9a1c49517..f8e79bd8ca9 100644 --- a/src/glsl/lower_packed_varyings.cpp +++ b/src/glsl/lower_packed_varyings.cpp @@ -645,14 +645,8 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var) if (var->data.explicit_location) return false; - const glsl_type *type = var->type; - if (this->gs_input_vertices != 0) { - assert(type->is_array()); - type = type->element_type(); - } - if (type->is_array()) - type = type->fields.array; - if (type->vector_elements == 4 && !type->is_double()) + if (var->type->without_array()->vector_elements == 4 && + !var->type->is_double()) return false; return true; } -- 2.30.2