r600g/compute: Fix possible endless loop in compute_memory_pool allocations.
authorJan Vesely <jan.vesely@rutgers.edu>
Thu, 19 Jun 2014 18:20:00 +0000 (20:20 +0200)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 24 Jun 2014 16:36:55 +0000 (12:36 -0400)
commit9575225e12c66bf409ce2269400f9ad148ffe0a2
tree3fe00a6de301e622627f53e4f38bb47167ee9ecb
parent0c181cdc6c0efdd98927b010239e0376399cecbf
r600g/compute: Fix possible endless loop in compute_memory_pool allocations.

The important part is the change of the condition to <= 0. Otherwise the loop
gets stuck never actually growing the pool.

The change in the aux-need calculation guarantees max 2 iterations, and
avoids wasting memory in case a smaller item can't fit into a relatively larger
pool.

Reviewed-by: Bruno Jiménez <brunojimen@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/drivers/r600/compute_memory_pool.c