glsl: Fix off-by-one error setting max_array_access for non-constant indexing

NOTE: This is a candidate for the stable branches.
This commit is contained in:
Ian Romanick 2011-03-24 16:50:23 -07:00
parent bc83f6bd58
commit 0d9d036004

View file

@ -1577,7 +1577,7 @@ ast_expression::hir(exec_list *instructions,
*/
ir_variable *v = array->whole_variable_referenced();
if (v != NULL)
v->max_array_access = array->type->array_size();
v->max_array_access = array->type->array_size() - 1;
}
}