glsl: fix packing support for arrays of doubles
authorTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 27 Apr 2015 21:26:36 +0000 (07:26 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 27 Apr 2015 21:49:32 +0000 (07:49 +1000)
Broke in commit f00c5f85b82efe9535b18dbf97c4591fb28aeae6 when
adding support for multidimensional arrays

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
src/glsl/lower_packed_varyings.cpp

index f8e79bd8ca96c43a5fc0831c4ee10a90380e83ff..d8bebb52235f91eeb948af09afd7c2c28410015e 100644 (file)
@@ -645,8 +645,8 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
    if (var->data.explicit_location)
       return false;
 
-   if (var->type->without_array()->vector_elements == 4 &&
-       !var->type->is_double())
+   const glsl_type *type = var->type->without_array();
+   if (type->vector_elements == 4 && !type->is_double())
       return false;
    return true;
 }