summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h3
-rw-r--r--src/mesa/drivers/dri/i965/gen6_constant_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/genX_state_upload.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 3a613ff63e6..d7ea7fae31d 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -552,7 +552,8 @@ struct brw_stage_state
/** Offset in the batchbuffer to Gen4-5 pipelined state (VS/WM/GS_STATE). */
uint32_t state_offset;
- uint32_t push_const_offset; /* Offset in the batchbuffer */
+ struct brw_bo *push_const_bo; /* NULL if using the batchbuffer */
+ uint32_t push_const_offset; /* Offset in the push constant BO or batch */
int push_const_size; /* in 256-bit register increments */
/* Binding table: pointers to SURFACE_STATE entries. */
diff --git a/src/mesa/drivers/dri/i965/gen6_constant_state.c b/src/mesa/drivers/dri/i965/gen6_constant_state.c
index f3927c5dba2..920f502ca37 100644
--- a/src/mesa/drivers/dri/i965/gen6_constant_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_constant_state.c
@@ -65,7 +65,8 @@ gen6_upload_push_constants(struct brw_context *brw,
const int size = prog_data->nr_params * sizeof(gl_constant_value);
gl_constant_value *param;
if (brw->gen >= 8 || brw->is_haswell) {
- param = intel_upload_space(brw, size, 32, &brw->curbe.curbe_bo,
+ param = intel_upload_space(brw, size, 32,
+ &stage_state->push_const_bo,
&stage_state->push_const_offset);
} else {
param = brw_state_batch(brw, size, 32,
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index b6678ec6941..e0b87b762d2 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -2858,7 +2858,8 @@ upload_constant_state(struct brw_context *brw,
#if GEN_GEN >= 8 || GEN_IS_HASWELL
pkt.ConstantBody.ReadLength[2] = stage_state->push_const_size;
pkt.ConstantBody.Buffer[2] =
- render_ro_bo(brw->curbe.curbe_bo, stage_state->push_const_offset);
+ render_ro_bo(stage_state->push_const_bo,
+ stage_state->push_const_offset);
#else
pkt.ConstantBody.ReadLength[0] = stage_state->push_const_size;
pkt.ConstantBody.Buffer[0].offset =