gallium/u_queue: add optional cleanup callback
authorRob Clark <robdclark@gmail.com>
Wed, 13 Jul 2016 16:17:05 +0000 (12:17 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 16 Jul 2016 14:00:04 +0000 (10:00 -0400)
commit44bbfedbd9983c61f6a461cbfe2e0dc74eda6d37
tree54af9e04c52b8e9f2cedc72515bc13ba846fb8eb
parent6f73c7595fab450ae9fd1af67aaed322bca02ee0
gallium/u_queue: add optional cleanup callback

Adds a second optional cleanup callback, called after the fence is
signaled.  This is needed if, for example, the queue has the last
reference to the object that embeds the util_queue_fence.  In this
case we cannot drop the ref in the main callback, since that would
result in the fence being destroyed before it is signaled.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/util/u_queue.c
src/gallium/auxiliary/util/u_queue.h
src/gallium/drivers/radeonsi/si_state_shaders.c
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
src/gallium/winsys/radeon/drm/radeon_drm_cs.c