This paves the way for using gen7_upload_constant_state for PS data.
The formula is copied from gen7_wm_state.c.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
/* XXX: Should this happen somewhere before to get our state flag set? */
_mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
- if (prog_data->nr_params != 0) {
+ if (prog_data->nr_params == 0) {
+ brw->wm.base.push_const_size = 0;
+ } else {
float *constants;
unsigned int i;
printf("\n");
printf("\n");
}
+
+ brw->wm.base.push_const_size =
+ ALIGN(prog_data->nr_params, prog_data->dispatch_width) / 8;
}
}