mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
winsys/amdgpu: clear the buffer cache on allocation failure and try again
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
f9d6fe8001
commit
eb1e1af676
1 changed files with 7 additions and 2 deletions
|
|
@ -495,8 +495,13 @@ amdgpu_bo_create(struct radeon_winsys *rws,
|
|||
|
||||
/* Create a new one. */
|
||||
bo = amdgpu_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 = amdgpu_create_bo(ws, size, alignment, usage, domain, flags);
|
||||
if (!bo)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bo->use_reusable_pool = use_reusable_pool;
|
||||
return &bo->base;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue