diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp index 426862c039c..c9d5ca1e356 100644 --- a/src/compiler/glsl/ir_validate.cpp +++ b/src/compiler/glsl/ir_validate.cpp @@ -98,7 +98,10 @@ ir_validate::visit(ir_dereference_variable *ir) abort(); } - if (ir->var->type != ir->type) { + /* Compare types without arrays, because one side can be sized and + * the other unsized. + */ + if (ir->var->type->without_array() != ir->type->without_array()) { printf("ir_dereference_variable type is not equal to variable type: "); ir->print(); printf("\n");