diff options
author | Marek Olšák <[email protected]> | 2015-12-09 22:36:26 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-12-11 15:25:13 +0100 |
commit | f9d6fe800113656098e72baad5e5f856627b74e3 (patch) | |
tree | 110b49023712e0a50b5779b5977715e1d5046230 /src/gallium/winsys | |
parent | cf811faeff1eaa1aef817ae45314cc3419c44222 (diff) |
winsys/radeon: clear the buffer cache on allocation failure and try again
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-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; |