u_upload_mgr: rework the application of alignment
authorMarek Olšák <marek.olsak@amd.com>
Sat, 19 Dec 2015 15:44:52 +0000 (16:44 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 2 Jan 2016 14:15:44 +0000 (15:15 +0100)
commitffc4716e9730ca162ce5dfcf0298125269c6d908
tree37571ed7bcc236998dc969ab82e11529a9c1871e
parent36c93a6fae275614b6004ec5ab085774d527e1bc
u_upload_mgr: rework the application of alignment

The function only aligned the size, but not the offset.
The offset was aligned only when the previous suballocation was aligned.
That yielded the correct offset alignment if the alignment was constant
for all suballocations.

Instead, directly align the offset, but allow an unaligned size.
There is no change in behavior, because the alignment is constant
at the moment.

This a prerequisite for allowing a variable alignment for suballocations.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/util/u_upload_mgr.c