diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index f09e7e819cb..a01cc15b1ca 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -221,7 +221,7 @@ static uint64_t radeon_bomgr_find_va(struct radeon_bomgr *mgr, uint64_t size, ui pipe_mutex_unlock(mgr->bo_va_mutex); return offset; } - if ((hole->size - waste) >= size) { + if ((hole->size - waste) > size) { if (waste) { n = CALLOC_STRUCT(radeon_bo_va_hole); n->size = waste; @@ -233,6 +233,11 @@ static uint64_t radeon_bomgr_find_va(struct radeon_bomgr *mgr, uint64_t size, ui pipe_mutex_unlock(mgr->bo_va_mutex); return offset; } + if ((hole->size - waste) == size) { + hole->size = waste; + pipe_mutex_unlock(mgr->bo_va_mutex); + return offset; + } } offset = mgr->va_offset; |