i965/vs: Fix variable indexed array access with more than one array.

The offset to the arrays after the first was mis-scaled, so we'd go
access off the end of the surface and read 0s.  Fixes
glsl-vs-uniform-array-3.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2011-09-06 17:46:25 -07:00
parent 6af968b673
commit 27c03cb86a
1 changed files with 1 additions and 1 deletions

View File

@ -2211,7 +2211,7 @@ vec4_visitor::move_uniform_array_access_to_pull_constants()
if (pull_constant_loc[uniform] == -1) {
const float **values = &prog_data->param[uniform * 4];
pull_constant_loc[uniform] = prog_data->nr_pull_params;
pull_constant_loc[uniform] = prog_data->nr_pull_params / 4;
for (int j = 0; j < uniform_size[uniform] * 4; j++) {
prog_data->pull_param[prog_data->nr_pull_params++] = values[j];