This way we can avoid defragmenting the pool, even if it is needed
to defragment it, and looping again through the list of unallocated
items.
---
src/gallium/drivers/r600/compute_memory_pool.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c
b/src/gallium/drivers/r600/compute_memory_pool.c
index b158f5e..75a8bd3 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -262,6 +262,10 @@ int compute_memory_finalize_pending(struct
compute_memory_pool* pool,
unallocated += align(item->size_in_dw, ITEM_ALIGNMENT);
}
+ if (unallocated == 0) {
+ return 0;
+ }
+
if (pool->status & POOL_FRAGMENTED) {
compute_memory_defrag(pool, pipe);
}
--
2.0.1
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev