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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user