For cross-process timelines we have to have a thread to wait till the requested points become available.
The functions actually dealing with timeline semaphores stubbed out, to implement in the next patch. As such the thread code shouldn't trigger yet.
The core idea is that we still use the refcount mechanism that we use with emulated timelines, though the native timeline syncobj don't participate in the refcounting. This way we keep the ordering of submission in a queue as each submission is also blocked by its predecessor.
Where we change behavior is when the number of blockers reaches 0. In the new code we check if we need to wait for the timeline semaphores to be available and if so we won't execute the submission immediately but pass it to the submission thread.
fb6b38d7800 radv: Add thread for timeline syncobj submission.
src/amd/vulkan/radv_device.c | 167 ++++++++++++++++++++++++++++++++++--------
src/amd/vulkan/radv_private.h | 9 +++
2 files changed, 147 insertions(+), 29 deletions(-)