glsl: support packing of arrays of arrays
authorTimothy Arceri <t_arceri@yahoo.com.au>
Fri, 27 Feb 2015 11:43:39 +0000 (22:43 +1100)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 27 Apr 2015 11:31:01 +0000 (21:31 +1000)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/glsl/lower_packed_varyings.cpp

index 2c9a1c49517032363bc1813fe4c2158d22163b22..f8e79bd8ca96c43a5fc0831c4ee10a90380e83ff 100644 (file)
@@ -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;
 }