eg/compute: Use reference counting to handle compute memory pool.
authorJan Vesely <jan.vesely@rutgers.edu>
Thu, 3 May 2018 23:26:29 +0000 (19:26 -0400)
committerJan Vesely <jan.vesely@rutgers.edu>
Tue, 15 May 2018 23:01:47 +0000 (19:01 -0400)
commitf3521ce2c440bd50020a3ff81e6d9fa17c01009c
treec53673203fac84a2170eb30513a0d993f3b2cc8e
parente01af38d6faf5dfd0f4ac6548ae03c27cca1dede
eg/compute: Use reference counting to handle compute memory pool.

Use pipe_reference to release old RAT surfaces.
RAT surface adds a reference to pool bo, so use reference counting for pool->bo
as well.

v2: Use the same pattern for both defrag paths
    Drop confusing comment

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/compute_memory_pool.c
src/gallium/drivers/r600/evergreen_compute.c