diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2011-03-24 16:50:23 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2011-04-11 19:06:48 -0700 |
commit | b31425aae9998db2e11f2fb78cceef1f53e762e4 (patch) | |
tree | 3c00373727aa221ed48333b055746cf2dc65ec5a | |
parent | 6c7a5d52ee04a6761acf64cd7b53f94deb547576 (diff) |
glsl: Fix off-by-one error setting max_array_access for non-constant indexing
NOTE: This is a candidate for the stable branches.
(cherry picked from commit 0d9d036004f135c38990c60f46074b70cff6e663)
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index ec25bcbd42b..bea41d97ccb 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1573,7 +1573,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; } } |