This is what we do in the condition too, so it makes sense.
---
 src/compiler/glsl/link_varyings.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/link_varyings.cpp 
b/src/compiler/glsl/link_varyings.cpp
index 66a20a2c9b..af938611f4 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -568,7 +568,7 @@ validate_explicit_variable_location(struct gl_context *ctx,
 
    if (type->without_array()->is_interface()) {
       for (unsigned i = 0; i < type->without_array()->length; i++) {
-         glsl_struct_field *field = &type->fields.structure[i];
+         glsl_struct_field *field = 
&type->without_array()->fields.structure[i];
          unsigned field_location = field->location -
             (field->patch ? VARYING_SLOT_PATCH0 : VARYING_SLOT_VAR0);
          if (!check_location_aliasing(explicit_locations, var,
-- 
2.11.0

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to