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) {
void
vec4_vs_visitor::setup_uniform_clipplane_values()
{
+ if (key->nr_userclip_plane_consts == 0)
+ return;
+
+ assert(stage_prog_data->nr_params == (unsigned)this->uniforms * 4);
+ 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] = dst_reg(UNIFORM, this->uniforms);
this->userplane[i].type = BRW_REGISTER_TYPE_F;
*/
int param_count = vp->program.nir->num_uniforms / 4;
- /* vec4_visitor::setup_uniform_clipplane_values() also uploads user clip
- * planes as uniforms.
- */
- param_count += key->nr_userclip_plane_consts * 4;
-
stage_prog_data->param = rzalloc_array(NULL, uint32_t, param_count);
stage_prog_data->pull_param = rzalloc_array(NULL, uint32_t, param_count);
stage_prog_data->nr_params = param_count;