diff options
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 8e86f746217..b9716e50229 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -767,8 +767,13 @@ radeon_winsys_bo_create(struct radeon_winsys *rws, } bo = radeon_create_bo(ws, size, alignment, usage, domain, flags); - if (!bo) - return NULL; + if (!bo) { + /* Clear the cache and try again. */ + pb_cache_release_all_buffers(&ws->bo_cache); + bo = radeon_create_bo(ws, size, alignment, usage, domain, flags); + if (!bo) + return NULL; + } bo->use_reusable_pool = use_reusable_pool; |