mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
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:2dfc119f22"i965: Grow the batch/state buffers if we need space and can't flush." Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit2af7085460)
This commit is contained in:
parent
f1050f0435
commit
a49b70d2ec
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue