vkr: properly retire signaled_syncs and pending_syncs
When a guest app crashes or calls vkDestroyInstance
, !501 (closed) sets those remaining syncs belonging to the destroyed context to signal in the timeline, so that the syncs will later be retired known by crosvm.
When a guest app holds the instance but destroys the device and create new ones afterwards, both the signaled_syncs
and pending_syncs
tied to the prior device need to be retired properly.
- If
ASYNC_FENCE_CB
is set, we can retire those directly atvkr_queue_destroy
. - If
ASYNC_FENCE_CB
is not set, we destroy theVkFence
atvkr_queue_destroy
and move the queue sync to the context to be retired and freed in the nextvkr_context_retire_fences
call.
Edited by Yiwei Zhang