[Mesa-dev] [PATCH 2/2] glsl: support packing of arrays of arrays

Timothy Arceri t_arceri at yahoo.com.au
Mon May 5 20:50:17 PDT 2014


Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
 src/glsl/lower_packed_varyings.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
index e865474..dd2e22e 100644
--- a/src/glsl/lower_packed_varyings.cpp
+++ b/src/glsl/lower_packed_varyings.cpp
@@ -591,12 +591,9 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
       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())
+   while (type->is_array()) {
       type = type->fields.array;
+   }
    if (type->vector_elements == 4)
       return false;
    return true;
-- 
1.9.0



More information about the mesa-dev mailing list