intel/vs: Grow the param array for clip planes

Instead of requiring the caller of brw_compile_vs to figure it out, just
grow the param array on-demand.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2017-09-29 10:50:07 -07:00
parent 6bcc5c0c75
commit 4dfb8b3416
3 changed files with 14 additions and 5 deletions

View File

@@ -470,6 +470,13 @@ fs_visitor::setup_uniform_clipplane_values()
const struct brw_vs_prog_key *key =
(const struct brw_vs_prog_key *) this->key;
if (key->nr_userclip_plane_consts == 0)
return;
assert(stage_prog_data->nr_params == uniforms);
brw_stage_prog_data_add_params(stage_prog_data,
key->nr_userclip_plane_consts * 4);
for (int i = 0; i < key->nr_userclip_plane_consts; i++) {
this->userplane[i] = fs_reg(UNIFORM, uniforms);
for (int j = 0; j < 4; ++j) {