mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-15 16:28:04 +02:00
pb_bufmgr_cache: flush cache when create_buffer fails and try again
NOTE: This is a candidate for the stable branches.
(cherry picked from commit 39d7de69b1)
This commit is contained in:
parent
986319cd20
commit
8b4315cb47
1 changed files with 7 additions and 0 deletions
|
|
@ -324,6 +324,13 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr,
|
|||
return NULL;
|
||||
|
||||
buf->buffer = mgr->provider->create_buffer(mgr->provider, size, desc);
|
||||
|
||||
/* Empty the cache and try again. */
|
||||
if (!buf->buffer) {
|
||||
mgr->base.flush(&mgr->base);
|
||||
buf->buffer = mgr->provider->create_buffer(mgr->provider, size, desc);
|
||||
}
|
||||
|
||||
if(!buf->buffer) {
|
||||
FREE(buf);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue