diff options
author | Kenneth Graunke <[email protected]> | 2017-11-28 08:30:50 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-11-29 17:30:35 -0800 |
commit | 2af70854609509adf5dc92af2fcf1c30938e2a5d (patch) | |
tree | 5a54fda48a5e44801e3d2da9b5df7655df6a55ea /src/mesa/drivers/dri/i965/intel_batchbuffer.c | |
parent | 2c4861e45319adae190fe59caa5950c064ca0d3c (diff) |
i965: Use old_bo->align when growing batch/state buffer instead of 4096.
The intention here is make the new BO use the same alignment as the old
BO. This isn't strictly necessary, but we would have to update the
'alignment' field in the validation list when swapping it out, and we
don't bother today.
The batch and state buffers use an alignment of 4096, so this should be
equivalent - it's just clearer than cut and pasting a magic constant.
Fixes: 2dfc119f22f257082ab0 "i965: Grow the batch/state buffers if we need space and can't flush."
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 10e33bb8c7b..658f7ea6989 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -293,7 +293,8 @@ grow_buffer(struct brw_context *brw, uint32_t *old_map = *map_ptr; struct brw_bo *old_bo = *bo_ptr; - struct brw_bo *new_bo = brw_bo_alloc(bufmgr, old_bo->name, new_size, 4096); + struct brw_bo *new_bo = + brw_bo_alloc(bufmgr, old_bo->name, new_size, old_bo->align); uint32_t *new_map; perf_debug("Growing %s - ran out of space\n", old_bo->name); |