Module: Mesa Branch: 7.10 Commit: b31425aae9998db2e11f2fb78cceef1f53e762e4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b31425aae9998db2e11f2fb78cceef1f53e762e4
Author: Ian Romanick <[email protected]> Date: Thu Mar 24 16:50:23 2011 -0700 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) --- 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 ec25bcb..bea41d9 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; } } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
