rzalloc_array(NULL, const gl_constant_value *, param_count);
c.prog_data.base.base.pull_param =
rzalloc_array(NULL, const gl_constant_value *, param_count);
- /* Setting nr_params here NOT to the size of the param and pull_param
- * arrays, but to the number of uniform components vec4_visitor
- * needs. vec4_visitor::setup_uniforms() will set it back to a proper value.
- */
- c.prog_data.base.base.nr_params = ALIGN(param_count, 4) / 4 + gs->num_samplers;
+ c.prog_data.base.base.nr_params = param_count;
if (brw->gen >= 7) {
if (gp->program.OutputType == GL_POINTS) {
*/
this->uniform_array_size = 1;
if (prog_data) {
- this->uniform_array_size = MAX2(stage_prog_data->nr_params, 1);
+ this->uniform_array_size =
+ MAX2(DIV_ROUND_UP(stage_prog_data->nr_params, 4), 1);
}
this->uniform_size = rzalloc_array(mem_ctx, int, this->uniform_array_size);
rzalloc_array(NULL, const gl_constant_value *, param_count);
stage_prog_data->pull_param =
rzalloc_array(NULL, const gl_constant_value *, param_count);
-
- /* Setting nr_params here NOT to the size of the param and pull_param
- * arrays, but to the number of uniform components vec4_visitor
- * needs. vec4_visitor::setup_uniforms() will set it back to a proper value.
- */
- stage_prog_data->nr_params = ALIGN(param_count, 4) / 4;
- if (vs) {
- stage_prog_data->nr_params += vs->num_samplers;
- }
+ stage_prog_data->nr_params = param_count;
GLbitfield64 outputs_written = vp->program.Base.OutputsWritten;
prog_data.inputs_read = vp->program.Base.InputsRead;