diff options
author | Bruno Jiménez <[email protected]> | 2014-07-16 23:12:46 +0200 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2014-07-23 10:29:17 -0400 |
commit | e7bda844e665c56c22d6ed0d801ee670d4137b1a (patch) | |
tree | e85ec0ba83e243bae3e77d38c9521ade5a85e076 | |
parent | 90d7b09ed2011c658aea1b913f8091c0e89a92bb (diff) |
r600g/compute: Quick exit if there's nothing to add to the pool
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.
Reviewed-by: Tom Stellard <[email protected]>
-rw-r--r-- | src/gallium/drivers/r600/compute_memory_pool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index b158f5e36be..75a8bd30dd7 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); } |