gpu: Ensure RingBuffer maintains aligned memory offsets.
When requesting a buffer for OOP raster, the client requests the largest free size for which no tokens are pending, and can be allocated without waiting. This is queried from RingBuffer::GetLargestFreeSize. However, since this size is rounded up to the next alignment when making the allocation, this results in synchronously waiting on tokens to make room for the extra padding. Ensure that ShrinkLastBlock rounds up the new size for the block so the buffer always has memory aligned free size. R=enne@chromium.org, piman@chromium.org Bug: 803925 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Iff1286b6f412f126dbf33300387f85f9c21e91ed Reviewed-on: https://chromium-review.googlesource.com/922445 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by:enne <enne@chromium.org> Reviewed-by:
Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#537250}
Showing
Please register or sign in to comment