r600g/compute: Defrag the pool at the same time as we grow it
authorBruno Jiménez <brunojimen@gmail.com>
Sat, 19 Jul 2014 17:35:51 +0000 (19:35 +0200)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 25 Jul 2014 21:51:57 +0000 (17:51 -0400)
commit654fd3e33f71702aa487b5b5249847bee73d4823
treef87bdd4b2c443936023a3228946c9de074af475b
parent4ca04f31122cacce249e98ed8985964bcb0d91e9
r600g/compute: Defrag the pool at the same time as we grow it

This allows us two things: we now need less item copies when we have
to defrag+grow the pool (to just one copy per item) and, even in the
case where we don't need to defrag the pool, we reduce the data copied
to just the useful data that the items use.

Note: The fallback path is a bit ugly now, but hopefully we won't need
it much.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/r600/compute_memory_pool.c
src/gallium/drivers/r600/compute_memory_pool.h