From: Jerome Glisse Date: Tue, 21 Feb 2012 17:34:54 +0000 (-0500) Subject: radeon/r600g: fix virtual address space allocation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e372e53ee0ed57072322003e508b3ca4c58076be;p=mesa.git radeon/r600g: fix virtual address space allocation Signed-off-by: Jerome Glisse --- diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 8e73e6f6e7e..31a47c6f14c 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -211,6 +211,9 @@ static uint64_t radeon_bomgr_find_va(struct radeon_bomgr *mgr, uint64_t size, ui waste = waste ? alignment - waste : 0; } offset += waste; + if (offset >= (hole->offset + hole->size)) { + continue; + } if (!waste && hole->size == size) { offset = hole->offset; list_del(&hole->list);