diff options
author | Ian Romanick <[email protected]> | 2011-03-24 16:50:23 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-03-25 11:28:07 -0700 |
commit | 0d9d036004f135c38990c60f46074b70cff6e663 (patch) | |
tree | c8bbd53b5efdc7a392283ebcda032b1fd345941d /src/glsl/ast_to_hir.cpp | |
parent | bc83f6bd585bba6dee3fa2264d32ab59e9a9c99e (diff) |
glsl: Fix off-by-one error setting max_array_access for non-constant indexing
NOTE: This is a candidate for the stable branches.
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-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 cdb16fd492b..a1c76e834af 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -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; } } |