glsl: let interface linking code validate its arrays
authorTimothy Arceri <t_arceri@yahoo.com.au>
Tue, 24 Feb 2015 06:28:51 +0000 (17:28 +1100)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 5 Mar 2015 20:26:57 +0000 (07:26 +1100)
Currently intrastage arrays are validated twice for interface blocks.

Reviewed-by: Mark Janes <mark.a.janes@intel.com>
src/glsl/linker.cpp

index 590f364d6c265fed3b026447d962e8e70fd8d1ed..0c4467779707fcc7b9fb90cb982ef051a242869f 100644 (file)
@@ -762,7 +762,8 @@ cross_validate_globals(struct gl_shader_program *prog,
             /* Check if types match. Interface blocks have some special
              * rules so we handle those elsewhere.
              */
-           if (var->type != existing->type) {
+           if (var->type != existing->type &&
+                !var->is_interface_instance()) {
               if (!validate_intrastage_arrays(prog, var, existing)) {
                   if (var->type->is_record() && existing->type->is_record()
                       && existing->type->record_compare(var->type)) {