- /* Allocate the references to the uniforms that will end up in the
- * prog_data associated with the compiled program, and which will be freed
- * by the state cache.
- */
- int param_count = vp->program.nir->num_uniforms / 4;
-
- prog_data.base.base.nr_image_params = vp->program.info.num_images;
-
- /* 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, const gl_constant_value *, param_count);
- stage_prog_data->pull_param =
- rzalloc_array(NULL, const gl_constant_value *, param_count);
- stage_prog_data->image_param =
- rzalloc_array(NULL, struct brw_image_param,
- stage_prog_data->nr_image_params);
- stage_prog_data->nr_params = param_count;
-