- /* 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 = fp->program.nir->num_uniforms / 4;
- prog_data.base.nr_image_params = fp->program.info.num_images;
- /* The backend also sometimes adds params for texture size. */
- param_count += 2 * ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits;
- prog_data.base.param =
- rzalloc_array(NULL, const gl_constant_value *, param_count);
- prog_data.base.pull_param =
- rzalloc_array(NULL, const gl_constant_value *, param_count);
- prog_data.base.image_param =
- rzalloc_array(NULL, struct brw_image_param,
- prog_data.base.nr_image_params);
- prog_data.base.nr_params = param_count;
-