I'm writing a program that uses libev to wait on many file descriptors. When data comes in, a vulkan compute shader gets run to process the data. The completion of that shader is signalled with a fence. I'd rather not block my event loop to wait for completion to return results.
I originally tried getting a file descriptor using VkGetFenceFdKHR
, with the VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT
set on the fence to get a sync file, but one of the computers that i'm targetting doesn't support that feature.
For the time being, i'm just polling the fences with a timer and vkGetFenceStatus
, but that feels really inefficient. is there a better way to wake up my event loop?