diff options
Diffstat (limited to 'mesalib/src/glsl/link_functions.cpp')
-rw-r--r-- | mesalib/src/glsl/link_functions.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mesalib/src/glsl/link_functions.cpp b/mesalib/src/glsl/link_functions.cpp index d62c16853..537f4dc77 100644 --- a/mesalib/src/glsl/link_functions.cpp +++ b/mesalib/src/glsl/link_functions.cpp @@ -245,11 +245,19 @@ public: /* Similarly, we need implicit sizes of arrays within interface * blocks to be sized by the maximal access in *any* shader. */ + unsigned *const linked_max_ifc_array_access = + var->get_max_ifc_array_access(); + unsigned *const ir_max_ifc_array_access = + ir->var->get_max_ifc_array_access(); + + assert(linked_max_ifc_array_access != NULL); + assert(ir_max_ifc_array_access != NULL); + for (unsigned i = 0; i < var->get_interface_type()->length; i++) { - var->max_ifc_array_access[i] = - MAX2(var->max_ifc_array_access[i], - ir->var->max_ifc_array_access[i]); + linked_max_ifc_array_access[i] = + MAX2(linked_max_ifc_array_access[i], + ir_max_ifc_array_access[i]); } } } |