Mesa (master): i965/fs: Record pull constant locations for all array elements.
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Mar 18 17:36:10 UTC 2014
Module: Mesa
Branch: master
Commit: 2163e0fd5a6bf2ac95aef331c30f010cb6e39cab
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2163e0fd5a6bf2ac95aef331c30f010cb6e39cab
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Mar 7 15:45:13 2014 -0800
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 <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++--
1 file 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 8faf401..d1bd697 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];
}
More information about the mesa-commit
mailing list