diff options
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r-- | src/glsl/ir_validate.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 5ed8abba0b4..96dd7bd9599 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -682,10 +682,15 @@ ir_validate::visit(ir_variable *ir) ir->get_interface_type()->fields.structure; for (unsigned i = 0; i < ir->get_interface_type()->length; i++) { if (fields[i].type->array_size() > 0) { - if (ir->max_ifc_array_access[i] >= fields[i].type->length) { + const unsigned *const max_ifc_array_access = + ir->get_max_ifc_array_access(); + + assert(max_ifc_array_access != NULL); + + if (max_ifc_array_access[i] >= fields[i].type->length) { printf("ir_variable has maximum access out of bounds for " "field %s (%d vs %d)\n", fields[i].name, - ir->max_ifc_array_access[i], fields[i].type->length); + max_ifc_array_access[i], fields[i].type->length); ir->print(); abort(); } |