Mesa (master): glsl: avoid hitting assert for arrays of arrays

Timothy Arceri tarceri at kemper.freedesktop.org
Thu Oct 15 10:21:50 UTC 2015


Module: Mesa
Branch: master
Commit: dd89880dc0924162e751141f9388e5dba089d1c0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd89880dc0924162e751141f9388e5dba089d1c0

Author: Timothy Arceri <t_arceri at yahoo.com.au>
Date:   Mon May 12 20:25:26 2014 +1000

glsl: avoid hitting assert for arrays of arrays

Also add TODO comment about adding proper support

Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/glsl/ir_set_program_inouts.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index b7a0f6e..d7c29b0 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -242,6 +242,12 @@ ir_set_program_inouts_visitor::try_mark_partial_variable(ir_variable *var,
       type = type->fields.array;
    }
 
+   /* TODO: implement proper arrays of arrays support
+    * for now let the caller mark whole variable as used.
+    */
+   if (type->is_array() && type->fields.array->is_array())
+      return false;
+
    /* The code below only handles:
     *
     * - Indexing into matrices




More information about the mesa-commit mailing list