summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2015-01-02 05:23:08 +0200
committerAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2015-09-11 10:53:25 +0300
commite4570dd3cf8d9cf29399fd33f95b49967db7d0d8 (patch)
tree7bc5015ed983dd0df40ab86be9d8d5923de8b346
parentaaa63c16f6fca54291a1300a22912a8264849ef1 (diff)
i965: Allocate space on the gather pool for plain uniforms
Reserve space in the gather pool where the gathered uniforms are flushed. Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
-rw-r--r--src/mesa/drivers/dri/i965/gen6_vs_state.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index 6653a6d759..b78166ec51 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -120,6 +120,14 @@ gen6_upload_push_constants(struct brw_context *brw,
*/
assert(stage_state->push_const_size <= 32);
}
+ /* Allocate gather pool space for uniform and UBO entries in 512-bit chunks*/
+ if (brw->gather_pool.bo != NULL) {
+ if (prog_data->nr_params > 0) {
+ int num_consts = ALIGN(prog_data->nr_params, 4) / 4;
+ stage_state->push_const_offset = brw->gather_pool.next_offset;
+ brw->gather_pool.next_offset += (ALIGN(num_consts, 4) / 4) * 64;
+ }
+ }
}
static void