anv: refcount semaphores
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 26 Oct 2019 15:59:59 +0000 (18:59 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 11 Nov 2019 21:46:51 +0000 (21:46 +0000)
commit3e223635376d7a5cfbbd2eccfe1d8ad2620fdfd2
tree5d2979e05bfde2e9aa0898b7af70dcad965d086b
parent3da798c9f1b463f514cf058577fe38561810ba74
anv: refcount semaphores

Delayed submissions required by timeline semaphores mean we need to be
able to update the sync fd backed semaphores in a delayed fashion.
This could mean a race between the application destroying the
semaphore and the submission code trying to update it with the new
sync fd.

This change prepares semaphores to be refcounted, we'll most likely
only take a reference for cases where we signal a sync fd semaphore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_private.h
src/intel/vulkan/anv_queue.c