[Mesa-dev] [PATCH 4/5] Tidy a bit compute_memory_finalize_pending
Bruno Jiménez
brunojimen at gmail.com
Fri Jan 3 16:27:32 PST 2014
---
src/gallium/drivers/r600/compute_memory_pool.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c
index 5374a48..954c890 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -320,21 +320,17 @@ int compute_memory_finalize_pending(struct compute_memory_pool* pool,
int64_t need = item->size_in_dw+2048 -
(pool->size_in_dw - allocated);
- need += 1024 - (need % 1024);
- if (need > 0) {
- err = compute_memory_grow_pool(pool,
- pipe,
- pool->size_in_dw + need);
- }
- else {
+ if (need <= 0) {
need = pool->size_in_dw / 10;
- need += 1024 - (need % 1024);
- err = compute_memory_grow_pool(pool,
- pipe,
- pool->size_in_dw + need);
}
+ need += 1024 - (need % 1024);
+
+ err = compute_memory_grow_pool(pool,
+ pipe,
+ pool->size_in_dw + need);
+
if(err == -1)
return -1;
}
--
1.8.5.2
More information about the mesa-dev
mailing list