diff options
author | Tom Stellard <[email protected]> | 2013-08-26 13:06:53 -0700 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-09-05 17:18:00 -0700 |
commit | 505fad04f10eee1efdfcd8986b4d484b49d39986 (patch) | |
tree | c55294158f36db0a3ee00f8d8b21670fb4e98adf /src | |
parent | f0435ebb07d01a77ca0d98967a002898811a5206 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/compute_memory_pool.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index a02df844ff0..75696d2397d 100644 --- a/src/gallium/drivers/r600/compute_memory_pool.c +++ b/src/gallium/drivers/r600/compute_memory_pool.c @@ -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; } } |