diff options
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/compute_memory_pool.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index e959a6d6723..01851add8cf 100644 --- a/src/gallium/drivers/r600/compute_memory_pool.c +++ b/src/gallium/drivers/r600/compute_memory_pool.c @@ -319,21 +319,16 @@ 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; } |