winsys/radeon: clear the buffer cache on allocation failure and try again

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Marek Olšák 2015-12-09 22:36:26 +01:00
parent cf811faeff
commit f9d6fe8001
1 changed files with 7 additions and 2 deletions

View File

@ -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;