diff options
author | Jason Ekstrand <[email protected]> | 2015-08-19 10:32:32 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-08-25 10:18:27 -0700 |
commit | c56899f41a904762225267cb9c543a0abd901ad5 (patch) | |
tree | 3e018d19740b181fcdb944ee5aead90b50feef1f /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 8d8b8f58540abbdb8a006a38830a08346a0edf34 (diff) |
i965: Make setup_vec4_uniform_value and _image_uniform_values take an offset
This way they don't implicitly increment the uniforms variable and don't
have to be called in-sequence during uniform setup.
Reviewed-by: Francisco Jerez <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 47cc16700e9..6ee9f3a3c64 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -943,16 +943,17 @@ fs_visitor::import_uniforms(fs_visitor *v) } void -fs_visitor::setup_vec4_uniform_value(const gl_constant_value *values, +fs_visitor::setup_vec4_uniform_value(unsigned param_offset, + const gl_constant_value *values, unsigned n) { static const gl_constant_value zero = { 0 }; for (unsigned i = 0; i < n; ++i) - stage_prog_data->param[uniforms++] = &values[i]; + stage_prog_data->param[param_offset + i] = &values[i]; for (unsigned i = n; i < 4; ++i) - stage_prog_data->param[uniforms++] = &zero; + stage_prog_data->param[param_offset + i] = &zero; } fs_reg * |