mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
r600g/compute: Fix bug in compute memory pool
When adding a new buffer to the beginning of the memory pool, we were accidentally deleting the buffer that was first in the buffer list. This was caused by a bug in the memory pool's linked list implementation.
This commit is contained in:
parent
f0435ebb07
commit
505fad04f1
1 changed files with 2 additions and 7 deletions
|
|
@ -337,14 +337,9 @@ void compute_memory_finalize_pending(struct compute_memory_pool* pool,
|
|||
}
|
||||
} else {
|
||||
/* Add item to the front of the list */
|
||||
item->next = pool->item_list->next;
|
||||
if (pool->item_list->next) {
|
||||
pool->item_list->next->prev = item;
|
||||
}
|
||||
item->next = pool->item_list;
|
||||
item->prev = pool->item_list->prev;
|
||||
if (pool->item_list->prev) {
|
||||
pool->item_list->prev->next = item;
|
||||
}
|
||||
pool->item_list->prev = item;
|
||||
pool->item_list = item;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue