Skip to content

proxy: ensure fence added to timeline before retired with async_cb

Yiwei Zhang requested to merge zzyiwei/virglrenderer:proxy-async-cb-fix into master

For cpu syncs, with async_cb, fence_retire gets called inside render worker submit_fence. Sync thread of proxy will catch it right away and retire the fence before the fence gets added to the timeline. Without this CL, the guest cpu syncs will always wait until timeout. Any following sync points added to the global fencing timeline at virtio-gpu device process will be blocked. As long as there's a fence on the timeline must be waited to signal (e.g. wsi purpose), a deadlock occurs.

Similar fix(30bb18d3) has landed previously for virgl and the sync threads of its sub-ctx. This fix handles the similar in between proxy and server.

TEST: ANGLE on Venus works normally with VIRGL_RENDERER_ASYNC_FENCE_CB enabled

/cc @ryanneph @olv

Edited by Yiwei Zhang

Merge request reports