summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-03-07 15:45:13 -0800
committerKenneth Graunke <[email protected]>2014-03-18 10:11:24 -0700
commit2163e0fd5a6bf2ac95aef331c30f010cb6e39cab (patch)
treeeb61053860d0639a1c0bbe78e05fe9403a19f5fd /src/mesa
parent7c7627781feca0c8738da66425d6c530ea598dc4 (diff)
i965/fs: Record pull constant locations for all array elements.
When demoting a variably indexed uniform array to pull constants, we only recorded the location for the base of the array (element 0). Recording locations for all array elements is a trivial amount of code and will make subsequent refactoring easier. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 8faf4016731..d1bd6974316 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1854,11 +1854,11 @@ fs_visitor::move_uniform_array_access_to_pull_constants()
if (pull_constant_loc[uniform] == -1) {
const float **values = &stage_prog_data->param[uniform];
- pull_constant_loc[uniform] = stage_prog_data->nr_pull_params;
-
assert(param_size[uniform]);
for (int j = 0; j < param_size[uniform]; j++) {
+ pull_constant_loc[uniform + j] = stage_prog_data->nr_pull_params;
+
stage_prog_data->pull_param[stage_prog_data->nr_pull_params++] =
values[j];
}