diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_constant_state.c | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_constant_state.c b/src/mesa/drivers/dri/i965/gen6_constant_state.c index 460f1c51457..749e77e958f 100644 --- a/src/mesa/drivers/dri/i965/gen6_constant_state.c +++ b/src/mesa/drivers/dri/i965/gen6_constant_state.c @@ -25,6 +25,7 @@ #include "brw_state.h" #include "brw_defines.h" #include "intel_batchbuffer.h" +#include "intel_buffer_objects.h" #include "program/prog_parameter.h" /** @@ -60,12 +61,16 @@ gen6_upload_push_constants(struct brw_context *brw, if (prog) _mesa_load_state_parameters(ctx, prog->Parameters); - gl_constant_value *param; int i; - - param = brw_state_batch(brw, - prog_data->nr_params * sizeof(gl_constant_value), - 32, &stage_state->push_const_offset); + const int size = prog_data->nr_params * sizeof(gl_constant_value); + gl_constant_value *param; + if (brw->gen >= 9) { + param = intel_upload_space(brw, size, 32, &brw->curbe.curbe_bo, + &stage_state->push_const_offset); + } else { + param = brw_state_batch(brw, size, 32, + &stage_state->push_const_offset); + } STATIC_ASSERT(sizeof(gl_constant_value) == sizeof(float)); diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 64ba3577383..f7128ae8960 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -2601,7 +2601,7 @@ upload_constant_state(struct brw_context *brw, pkt.ConstantBody.ConstantBuffer2ReadLength = stage_state->push_const_size; pkt.ConstantBody.PointerToConstantBuffer2 = - render_ro_bo(brw->batch.bo, stage_state->push_const_offset); + render_ro_bo(brw->curbe.curbe_bo, stage_state->push_const_offset); #else pkt.ConstantBody.ConstantBuffer0ReadLength = stage_state->push_const_size; |