Module: Mesa Branch: master Commit: a60be05284399202c7a5a7aaf4d1f8f0626aee80 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a60be05284399202c7a5a7aaf4d1f8f0626aee80
Author: Michel Dänzer <[email protected]> Date: Wed Aug 15 15:48:34 2012 +0200 gallium/radeon: Create hole for waste when allocating from va_offset. Otherwise, the wasted area could never be used for an allocation again. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]> --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 6 ++++++ 1 files changed, 6 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 79355af..9bddcd3 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -246,6 +246,12 @@ static uint64_t radeon_bomgr_find_va(struct radeon_bomgr *mgr, uint64_t size, ui waste = offset % alignment; waste = waste ? alignment - waste : 0; } + if (waste) { + n = CALLOC_STRUCT(radeon_bo_va_hole); + n->size = waste; + n->offset = offset; + list_add(&n->list, &mgr->va_holes); + } offset += waste; mgr->va_offset += size + waste; pipe_mutex_unlock(mgr->bo_va_mutex); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
