summaryrefslogtreecommitdiff
authorJerome Glisse <jglisse@redhat.com>2012-02-21 17:34:54 (GMT)
committer Jerome Glisse <jglisse@redhat.com>2012-02-21 17:34:54 (GMT)
commite372e53ee0ed57072322003e508b3ca4c58076be (patch) (side-by-side diff)
tree97cf4db9fb3f3ce60a170e3cdc37d2343cb75126
parent6fd62c998a178dcb4f1fddb6b1b46705f09ef8d9 (diff)
downloadmesa-e372e53ee0ed57072322003e508b3ca4c58076be.zip
mesa-e372e53ee0ed57072322003e508b3ca4c58076be.tar.gz
radeon/r600g: fix virtual address space allocation
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 8e73e6f..31a47c6 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);