summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-13 14:37:09 -0700
committerKenneth Graunke <[email protected]>2013-09-16 18:25:11 -0700
commite776c18afb356aeb4a1d1d26ac1e440f37174e37 (patch)
treedd594c45f1010b0822fc30d751c04abcfb814a38 /src/mesa/drivers/dri/i965
parentd385edf4c32bf92daa415d32fc1e70934cfca268 (diff)
i965: Set brw_stage_state::push_const_size for PS constants.
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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_wm_state.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index 1fa5d95d505..c96a107d5b2 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -50,7 +50,9 @@ gen6_upload_wm_push_constants(struct brw_context *brw)
/* 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;
@@ -75,6 +77,9 @@ gen6_upload_wm_push_constants(struct brw_context *brw)
printf("\n");
printf("\n");
}
+
+ brw->wm.base.push_const_size =
+ ALIGN(prog_data->nr_params, prog_data->dispatch_width) / 8;
}
}